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
,java.io.Serializable
public class ArrayNode extends ExpressionNode
A node representing an array to create.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ARRAY
The array with content constructor.static int
ARRAY_DIMENSION
The empty array constructor.protected int
type
The node type.-
Fields inherited from class jadex.javaparser.javaccimpl.ExpressionNode
constant, constant_value, expressiontext, imports, static_type, text
-
Fields inherited from class jadex.javaparser.javaccimpl.SimpleNode
children, id, parent
-
-
Constructor Summary
Constructors Constructor Description ArrayNode(jadex.javaparser.javaccimpl.ParserImpl p, int id)
Create an expression node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Test if two nodes are equal.int
getType()
Get the node type.java.lang.Object
getValue(IValueFetcher fetcher)
Evaluate the expression in the given state with respect to given parameters.int
hashCode()
Get the hash code for the node.void
precompile()
Precompute type, and perform checks.void
setType(int type)
Set the node type.java.lang.String
toPlainString()
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, toString
-
Methods inherited from class jadex.javaparser.javaccimpl.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent
-
-
-
-
Field Detail
-
ARRAY
public static final int ARRAY
The array with content constructor.- See Also:
- Constant Field Values
-
ARRAY_DIMENSION
public static final int ARRAY_DIMENSION
The empty array constructor.- See Also:
- Constant Field Values
-
type
protected int type
The node type.
-
-
Method Detail
-
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:
precompile
in classExpressionNode
-
getValue
public java.lang.Object getValue(IValueFetcher fetcher)
Evaluate the expression in the given state with respect to given parameters.- Specified by:
getValue
in interfaceIParsedExpression
- Specified by:
getValue
in classExpressionNode
- Parameters:
params
- The parameters (string, value pairs), if any.- Returns:
- The value of the term.
-
toPlainString
public java.lang.String toPlainString()
Create a string representation of this node and its subnodes.- Specified by:
toPlainString
in interfaceNode
- Overrides:
toPlainString
in classExpressionNode
- Returns:
- A string representation of this node.
-
equals
public boolean equals(java.lang.Object o)
Test if two nodes are equal.- Overrides:
equals
in classExpressionNode
-
hashCode
public int hashCode()
Get the hash code for the node.- Overrides:
hashCode
in classExpressionNode
-
-