Package edu.tufts.hrilab.action
Class ActionBinding
java.lang.Object
edu.tufts.hrilab.action.ActionBinding
- All Implemented Interfaces:
Serializable
,Cloneable
An
ActionBinding
is an association between a variable name and a
value. This is really a variable, insofar as it can be uninitialized (i.e.,
have no value associated with it). An uninitialized binding consists of a
name and a type, and may later be bound to an object.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
This variable's default value.final boolean
Is this ActionBinding a local variable.final boolean
If this ActionBinding is a return value.final Class<?>
The Java type of this variable (i.e., Java class).protected static final org.slf4j.Logger
final String
The name of this variable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Bind (or rebind) a variablevoid
Bind (or rebind) a variable, recursing through bindings to the bottomclone()
boolean
Get the variable's binding value.Get the variable's binding, recursing through bindings to the bottom.get the variable's binding name, recursing through bindings to the bottomClass<?>
get the variable's binding type, recursing through bindings to the bottomClass<?>
Get the variable's Java type.getName()
get the variable's binding nameGet the semantic type.boolean
Check if binding has a (non-null, non-empty) default valueint
hashCode()
boolean
If this binding has a semantic type.boolean
isBound()
boolean
isLocal()
boolean
isReturn()
boolean
isVarArg()
toString()
-
Field Details
-
log
protected static final org.slf4j.Logger log -
name
The name of this variable. -
javaType
The Java type of this variable (i.e., Java class). -
defaultValue
This variable's default value. -
isLocal
public final boolean isLocalIs this ActionBinding a local variable. -
isReturn
public final boolean isReturnIf this ActionBinding is a return value.
-
-
Constructor Details
-
ActionBinding
Deep copy an ActionBinding object.
-
-
Method Details
-
hasSemanticType
public boolean hasSemanticType()If this binding has a semantic type.- Returns:
-
isBound
public boolean isBound() -
isVarArg
public boolean isVarArg() -
isReturn
public boolean isReturn() -
isLocal
public boolean isLocal() -
getDefaultValue
-
bind
Bind (or rebind) a variable- Parameters:
value
- the value to which the variable is bound
-
bindDeep
Bind (or rebind) a variable, recursing through bindings to the bottom- Parameters:
value
- the value to which the variable is bound
-
getBinding
Get the variable's binding value.- Returns:
- the value to which the variable is bound
-
getSemanticType
Get the semantic type.- Returns:
-
getJavaType
Get the variable's Java type.- Returns:
- the type of the variable
-
getBindingDeep
Get the variable's binding, recursing through bindings to the bottom.- Returns:
- the value to which the variable is bound
-
getName
get the variable's binding name- Returns:
- the name to which the variable is bound
-
getBindingNameDeep
get the variable's binding name, recursing through bindings to the bottom- Returns:
- the name to which the variable is bound
-
hasDefaultValue
public boolean hasDefaultValue()Check if binding has a (non-null, non-empty) default value- Returns:
- true if default value available
-
getBindingTypeDeep
get the variable's binding type, recursing through bindings to the bottom- Returns:
- the type to which the variable is bound
-
clone
-
toString
-
equals
-
hashCode
public int hashCode()
-