Package jadex.javaparser.javaccimpl
Class ArrayNode
java.lang.Object
jadex.javaparser.javaccimpl.SimpleNode
jadex.javaparser.javaccimpl.ExpressionNode
jadex.javaparser.javaccimpl.ArrayNode
- All Implemented Interfaces:
IParsedExpression,Node,Serializable
A node representing an array to create.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe array with content constructor.static final intThe empty array constructor.protected intThe node type.Fields inherited from class jadex.javaparser.javaccimpl.ExpressionNode
constant, constant_value, expressiontext, imports, static_type, textFields inherited from class jadex.javaparser.javaccimpl.SimpleNode
children, id, parent -
Constructor Summary
ConstructorsConstructorDescriptionArrayNode(jadex.javaparser.javaccimpl.ParserImpl p, int id) Create an expression node. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest if two nodes are equal.intgetType()Get the node type.getValue(jadex.common.IValueFetcher fetcher) Evaluate the expression in the given state with respect to given parameters.inthashCode()Get the hash code for the node.voidPrecompute type, and perform checks.voidsetType(int type) Set the node type.Create a string representation of this node and its subnodes.Methods inherited from class jadex.javaparser.javaccimpl.ExpressionNode
appendText, getConstantValue, getExpressionText, getParameters, getStaticType, getText, getUnboundParameterNodes, isConstant, precompileTree, setConstant, setConstantValue, setExpressionText, setStaticType, setText, subnodeToString, throwEvaluationException, throwParseException, toString, toStringMethods inherited from class jadex.javaparser.javaccimpl.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent
-
Field Details
-
ARRAY
public static final int ARRAYThe array with content constructor.- See Also:
-
ARRAY_DIMENSION
public static final int ARRAY_DIMENSIONThe empty array constructor.- See Also:
-
type
protected int typeThe node type.
-
-
Constructor Details
-
ArrayNode
public ArrayNode(jadex.javaparser.javaccimpl.ParserImpl p, int id) Create an expression node.- Parameters:
p- The parser.id- The id.
-
-
Method Details
-
setType
public void setType(int type) Set the node type.- Parameters:
type- The node type.
-
getType
public int getType()Get the node type.- Returns:
- The node type.
-
precompile
public void precompile()Precompute type, and perform checks.- Overrides:
precompilein classExpressionNode
-
getValue
Evaluate the expression in the given state with respect to given parameters.- Specified by:
getValuein interfaceIParsedExpression- Specified by:
getValuein classExpressionNode- Parameters:
params- The parameters (string, value pairs), if any.- Returns:
- The value of the term.
-
toPlainString
Create a string representation of this node and its subnodes.- Specified by:
toPlainStringin interfaceNode- Overrides:
toPlainStringin classExpressionNode- Returns:
- A string representation of this node.
-
equals
Test if two nodes are equal.- Overrides:
equalsin classExpressionNode
-
hashCode
public int hashCode()Get the hash code for the node.- Overrides:
hashCodein classExpressionNode
-