org.apache.commons.jexl2.parser
Class ASTNumberLiteral
java.lang.Object
org.apache.commons.jexl2.parser.SimpleNode
org.apache.commons.jexl2.parser.JexlNode
org.apache.commons.jexl2.parser.ASTNumberLiteral
- All Implemented Interfaces:
- JexlInfo, JexlNode.Literal<Number>, Node
public class ASTNumberLiteral
- extends JexlNode
- implements JexlNode.Literal<Number>
Fields inherited from class org.apache.commons.jexl2.parser.JexlNode |
image |
Methods inherited from class org.apache.commons.jexl2.parser.SimpleNode |
childrenAccept, dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetParent, jjtSetValue, toString, toString |
ASTNumberLiteral
public ASTNumberLiteral(int id)
ASTNumberLiteral
public ASTNumberLiteral(Parser p,
int id)
getLiteral
public Number getLiteral()
- Gets the literal value.
- Specified by:
getLiteral
in interface JexlNode.Literal<Number>
- Returns:
- the number literal
isConstant
protected boolean isConstant(boolean literal)
-
- Overrides:
isConstant
in class JexlNode
jjtAccept
public Object jjtAccept(ParserVisitor visitor,
Object data)
- Accept the visitor.
- Specified by:
jjtAccept
in interface Node
- Overrides:
jjtAccept
in class SimpleNode
- Parameters:
visitor
- the visitordata
- contextual data
- Returns:
- result of visit
getLiteralClass
public Class<?> getLiteralClass()
isInteger
public boolean isInteger()
setNatural
public void setNatural(String s)
- Sets this node as a natural literal.
Originally from OGNL.
- Parameters:
s
- the natural as string
setReal
public void setReal(String s)
- Sets this node as a real literal.
Originally from OGNL.
- Parameters:
s
- the real as string
Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.