Class LocalVariable
java.lang.Object
com.aquima.interactions.expressions.semantics.SemanticNodeBase
com.aquima.interactions.expressions.semantics.nodes.LocalVariable
- All Implemented Interfaces:
ISemanticNode
This class holds the information for a local variable. A local variable consists of a name, and an expression that
should be used for the value.
- Since:
- 7.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionLocalVariable
(Position position, Identifier name, ISemanticNode expression) Constructs the local variable node with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoid
collectScopedObjects
(ScopedObjects resultSet) This method may be used to collect the names of the objects that need to be in scope in order to evaluate the expression of this node.This method returns an array containing the child nodes.This method returns the expression that should be used to determine the value of the variable.This method returns the name of the local variable.void
visit
(ISemanticNodeVisitor visitor) This method allows a type safe visitation of the node.Methods inherited from class com.aquima.interactions.expressions.semantics.SemanticNodeBase
addMessage, getDataType, getDomain, getMessages, getPosition, getType, hasMessage, isDerivedType, isMultivalue, setDerived, setDomain, setType, setType, toString
-
Constructor Details
-
LocalVariable
Constructs the local variable node with the required arguments.- Parameters:
position
- Position information for the node.name
- The name of the local variable.expression
- The expression that should be used to determine the value of the variable.
-
-
Method Details
-
getIdentifier
This method returns the name of the local variable.- Returns:
- The name of the local variable.
-
getExpression
This method returns the expression that should be used to determine the value of the variable.- Returns:
- The expression that should be used to determine the value of the variable.
-
getChildNodes
Description copied from interface:ISemanticNode
This method returns an array containing the child nodes. The order of the child nodes in the array is not defined, and the array may be empty for nodes that do not have child nodes.- Returns:
- Array containing the child nodes of this node.
-
collectScopedObjects
Description copied from interface:ISemanticNode
This method may be used to collect the names of the objects that need to be in scope in order to evaluate the expression of this node. The object passed to the method will be enriched with the names of the objects that need to be in scope.- Parameters:
resultSet
- The object that should be used to add the names of the objects that need to be in scope to.
-
visit
Description copied from interface:ISemanticNode
This method allows a type safe visitation of the node. The visit method will not invoke the visitor for any child nodes.- Parameters:
visitor
- The visitor that should be invoked for this node.
-