Class ScopedObjects

java.lang.Object
com.aquima.interactions.expressions.semantics.ScopedObjects

public class ScopedObjects extends Object
This class is used to gather the objects that need to be in-scope in order to be able to evaluate the expression.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • ScopedObjects

      public ScopedObjects(ITypeEnvironment definitions)
      Constructs the scoped objects class with the definitions. The definitions are used to determine if a local variable is of the same type as an object that is requested in the scope.
      Parameters:
      definitions - Object containing the definitions of the objects that may be used in an expression.
  • Method Details

    • add

      public void add(String scopeObject, boolean allAccess)
      This method will register an object access.
      Parameters:
      scopeObject - The object that is accessed.
      allAccess - Boolean indicating if all objects of this type are requested or just a singleton.
    • pushVariable

      public void pushVariable(String variableName)
      This method will register a local variable.
      Parameters:
      variableName - The name of the local variable.
    • popVariable

      public void popVariable()
      This method will de-register the last added variable.
    • getScopedObject

      public String[] getScopedObject()
      This method returns an array containing all the objects that were accessed.
      Returns:
      an array containing all the objects that were accessed.