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 StringThis variable's default value.final booleanIs this ActionBinding a local variable.final booleanIf this ActionBinding is a return value.final Class<?>The Java type of this variable (i.e., Java class).protected static final org.slf4j.Loggerfinal StringThe name of this variable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBind (or rebind) a variablevoidBind (or rebind) a variable, recursing through bindings to the bottomclone()booleanGet 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.booleanCheck if binding has a (non-null, non-empty) default valueinthashCode()booleanIf this binding has a semantic type.booleanisBound()booleanisLocal()booleanisReturn()booleanisVarArg()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()
-