Class ActionBinding

java.lang.Object
edu.tufts.hrilab.action.ActionBinding
All Implemented Interfaces:
Serializable, Cloneable

public class ActionBinding extends Object implements Cloneable, Serializable
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:
  • Field Details

    • log

      protected static final org.slf4j.Logger log
    • name

      public final String name
      The name of this variable.
    • javaType

      public final Class<?> javaType
      The Java type of this variable (i.e., Java class).
    • defaultValue

      public final String defaultValue
      This variable's default value.
    • isLocal

      public final boolean isLocal
      Is this ActionBinding a local variable.
    • isReturn

      public final boolean isReturn
      If this ActionBinding is a return value.
  • Constructor Details

    • ActionBinding

      public ActionBinding(ActionBinding other)
      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

      public String getDefaultValue()
    • bind

      public void bind(Object value)
      Bind (or rebind) a variable
      Parameters:
      value - the value to which the variable is bound
    • bindDeep

      public void bindDeep(Object value)
      Bind (or rebind) a variable, recursing through bindings to the bottom
      Parameters:
      value - the value to which the variable is bound
    • getBinding

      public Object getBinding()
      Get the variable's binding value.
      Returns:
      the value to which the variable is bound
    • getSemanticType

      public String getSemanticType()
      Get the semantic type.
      Returns:
    • getJavaType

      public Class<?> getJavaType()
      Get the variable's Java type.
      Returns:
      the type of the variable
    • getBindingDeep

      public Object getBindingDeep()
      Get the variable's binding, recursing through bindings to the bottom.
      Returns:
      the value to which the variable is bound
    • getName

      public String getName()
      get the variable's binding name
      Returns:
      the name to which the variable is bound
    • getBindingNameDeep

      public String 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

      public Class<?> getBindingTypeDeep()
      get the variable's binding type, recursing through bindings to the bottom
      Returns:
      the type to which the variable is bound
    • clone

      public ActionBinding clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object