Class Conversion
- java.lang.Object
-
- com.aquima.interactions.expressions.semantics.SemanticNodeBase
-
- com.aquima.interactions.expressions.semantics.nodes.Conversion
-
- All Implemented Interfaces:
ISemanticNode
public class Conversion extends SemanticNodeBase
The conversion expression is used to change the result data type of an expression.- Since:
- 6.4
- Author:
- O. Kerpershoek, F. van der Meer
-
-
Constructor Summary
Constructors Constructor Description Conversion(ISemanticNode expression, Type requestedType)
Constructs the node with the required arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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.ISemanticNode[]
getChildNodes()
This method returns an array containing the child nodes.ISemanticNode
getExpression()
this method returns the node whose result should be converted.DataType
getRequestedType()
This method returns the type the inner node should be converted to.String
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 Detail
-
Conversion
public Conversion(ISemanticNode expression, Type requestedType)
Constructs the node with the required arguments.- Parameters:
expression
- The expression who's result should be converted to another data type.requestedType
- The data type the result should be converted to.
-
-
Method Detail
-
getExpression
public ISemanticNode getExpression()
this method returns the node whose result should be converted.- Returns:
- the node whose result should be converted.
-
getRequestedType
public DataType getRequestedType()
This method returns the type the inner node should be converted to.- Returns:
- the type the inner node should be converted to.
-
getChildNodes
public ISemanticNode[] 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
public void collectScopedObjects(ScopedObjects resultSet)
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
public void visit(ISemanticNodeVisitor visitor)
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
public String toString()
- Overrides:
toString
in classSemanticNodeBase
-
-