Class FunctionCall
java.lang.Object
com.aquima.interactions.expressions.semantics.SemanticNodeBase
com.aquima.interactions.expressions.semantics.nodes.FunctionCall
- All Implemented Interfaces:
ISemanticNode
The function expression can be used to invoke a (custom) function.
- Since:
- 6.4
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionCall
(Position position, IFunction function, ISemanticNode... parameters) Constructs the 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.getArgument
(int index) This method returns the argument node for the specified index (zero based).int
this method returns an integer containing the number of arguments that are defined for the function.This method returns an array containing the nodes of the function arguments.This method returns an array containing the child nodes.This method returns the function implementation that should be invoked.toString()
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
-
Constructor Details
-
FunctionCall
Constructs the node with the required arguments.- Parameters:
position
- Position information for the node.function
- The implementation of the function that should be invoked.parameters
- The parameters (expressions) that should be passed to the function.
-
-
Method Details
-
getFunction
This method returns the function implementation that should be invoked.- Returns:
- the function implementation that should be invoked.
-
getArguments
This method returns an array containing the nodes of the function arguments.- Returns:
- an array containing the nodes of the function arguments.
-
getArgument
This method returns the argument node for the specified index (zero based).- Parameters:
index
- The index of the requested argument node.- Returns:
- the argument node for the specified index.
-
getArgumentCount
public int getArgumentCount()this method returns an integer containing the number of arguments that are defined for the function.- Returns:
- an integer containing the number of arguments that are defined for the function.
-
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.
-
toString
- Overrides:
toString
in classSemanticNodeBase
-