public abstract class Parameter extends Expression
Modifier and Type | Field and Description |
---|---|
protected boolean |
bound
Flag denoting whether this Parameter is currently bound.
|
protected java.lang.String |
content
The textual printed representation of the value, or null.
|
protected java.lang.Object |
value
The strongly-typed bound value of this Parameter, or null.
|
factory, type
Constructor and Description |
---|
Parameter()
Creates a default parameter.
|
Parameter(java.lang.String name,
java.lang.String type)
Creates a parameter of the given name and type.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(java.lang.Object value)
Assigns a new bound value to this Parameter.
|
java.lang.Object |
evaluate()
Evaluates this Parameter expression.
|
java.lang.Boolean |
getBound()
Optionally returns the value of the bound flag for marshalling.
|
java.lang.String |
getContent()
Returns the content of this Parameter.
|
boolean |
isAssignable()
Reports whether this Parameter is re-assignable.
|
boolean |
isBound()
Reports whether this Parameter is bound.
|
void |
rebind()
Rebinds this Parameter to its default value.
|
void |
rebind(java.lang.Object value)
Rebinds this Parameter to the given value.
|
Parameter |
resolve(Scope scope)
Degenerate method to resolve Parameter references in this Parameter.
|
Parameter |
setBound(boolean value)
Sets whether this Parameter is bound.
|
Parameter |
setContent(java.lang.String content)
Sets the content of this Parameter.
|
Parameter |
snapshot()
Takes a snapshot of this Parameter, fixing its current bound value.
|
java.lang.String |
toString()
The printable representation of a parameter is its name.
|
void |
unbind()
Unbinds this Parameter.
|
equals, getName, getType, hashCode, isBottom, isOrdered, setType
safeEquals, safeHashCode, semanticError
protected boolean bound
protected java.lang.Object value
protected java.lang.String content
public Parameter()
public Parameter(java.lang.String name, java.lang.String type)
name
- the name of this parameter.type
- the type of this parameter.public boolean isAssignable()
isAssignable
in class Expression
public java.lang.Object evaluate()
evaluate
in class Expression
public Parameter setBound(boolean value)
value
- true, if this Parameter is bound.public java.lang.Boolean getBound()
public boolean isBound()
isBound
in class Expression
public void unbind()
unbind
in class Expression
public void rebind()
rebind
in class Expression
public void rebind(java.lang.Object value)
rebind
in class Expression
value
- the value to bind.public Parameter resolve(Scope scope)
resolve
in class Expression
scope
- a table of global and local Parameters currently in
scope.public void assign(java.lang.Object value)
assign
in class Expression
value
- the value to assign.public java.lang.String toString()
public Parameter setContent(java.lang.String content)
content
- the content, as a String.public java.lang.String getContent()
public Parameter snapshot()