Package jadex.javaparser.javaccimpl
Class ConstantNode
- java.lang.Object
- 
- jadex.javaparser.javaccimpl.SimpleNode
- 
- jadex.javaparser.javaccimpl.ExpressionNode
- 
- jadex.javaparser.javaccimpl.ConstantNode
 
 
 
- 
- All Implemented Interfaces:
- IParsedExpression,- Node,- java.io.Serializable
 
 public class ConstantNode extends ExpressionNode Constant node representing a constant value.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class jadex.javaparser.javaccimpl.ExpressionNodeconstant, constant_value, expressiontext, imports, static_type, text
 - 
Fields inherited from class jadex.javaparser.javaccimpl.SimpleNodechildren, id, parent
 
- 
 - 
Constructor SummaryConstructors Constructor Description ConstantNode(jadex.javaparser.javaccimpl.ParserImpl p, int id)Create a node.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Test if two nodes are equal.java.lang.ObjectgetValue(IValueFetcher fetcher)Evaluate the expression in the given state with respect to given parameters.inthashCode()Get the hash code for the node.voidsetValue(java.lang.Object value)Set the constant value.java.lang.StringtoPlainString()Create a string representation of this node and its subnodes.java.lang.StringtoString(java.lang.String prefix)Create a string representation of this node for dumping in a tree.- 
Methods inherited from class jadex.javaparser.javaccimpl.ExpressionNodeappendText, getConstantValue, getExpressionText, getParameters, getStaticType, getText, getUnboundParameterNodes, isConstant, precompile, precompileTree, setConstant, setConstantValue, setExpressionText, setStaticType, setText, subnodeToString, throwEvaluationException, throwParseException, toString
 - 
Methods inherited from class jadex.javaparser.javaccimpl.SimpleNodedump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent
 
- 
 
- 
- 
- 
Method Detail- 
setValuepublic void setValue(java.lang.Object value) Set the constant value.- Parameters:
- value- The constant value.
 
 - 
getValuepublic java.lang.Object getValue(IValueFetcher fetcher) Evaluate the expression in the given state with respect to given parameters.- Specified by:
- getValuein interface- IParsedExpression
- Specified by:
- getValuein class- ExpressionNode
- Parameters:
- params- The parameters (string, value pairs), if any.
- Returns:
- The value of the term.
 
 - 
toPlainStringpublic java.lang.String toPlainString() Create a string representation of this node and its subnodes.- Specified by:
- toPlainStringin interface- Node
- Overrides:
- toPlainStringin class- ExpressionNode
- Returns:
- A string representation of this node.
 
 - 
toStringpublic java.lang.String toString(java.lang.String prefix) Create a string representation of this node for dumping in a tree.- Overrides:
- toStringin class- ExpressionNode
- Returns:
- A string representation of this node.
 
 - 
equalspublic boolean equals(java.lang.Object o) Test if two nodes are equal.- Overrides:
- equalsin class- ExpressionNode
 
 - 
hashCodepublic int hashCode() Get the hash code for the node.- Overrides:
- hashCodein class- ExpressionNode
 
 
- 
 
-