org.apache.commons.jexl2.parser
Class ASTNumberLiteral

java.lang.Object
  extended by org.apache.commons.jexl2.parser.SimpleNode
      extended by org.apache.commons.jexl2.parser.JexlNode
          extended by org.apache.commons.jexl2.parser.ASTNumberLiteral
All Implemented Interfaces:
JexlInfo, JexlNode.Literal<Number>, Node

public class ASTNumberLiteral
extends JexlNode
implements JexlNode.Literal<Number>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.jexl2.parser.JexlNode
JexlNode.Literal<T>
 
Field Summary
 
Fields inherited from class org.apache.commons.jexl2.parser.JexlNode
image
 
Fields inherited from class org.apache.commons.jexl2.parser.SimpleNode
children, id, parent, value
 
Constructor Summary
ASTNumberLiteral(int id)
           
ASTNumberLiteral(Parser p, int id)
           
 
Method Summary
 Number getLiteral()
          Gets the literal value.
 Class<?> getLiteralClass()
           
protected  boolean isConstant(boolean literal)
          
 boolean isInteger()
           
 Object jjtAccept(ParserVisitor visitor, Object data)
          Accept the visitor.
 void setNatural(String s)
          Sets this node as a natural literal.
 void setReal(String s)
          Sets this node as a real literal.
 
Methods inherited from class org.apache.commons.jexl2.parser.JexlNode
debugInfo, debugString, isConstant
 
Methods inherited from class org.apache.commons.jexl2.parser.SimpleNode
childrenAccept, dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetParent, jjtSetValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTNumberLiteral

public ASTNumberLiteral(int id)

ASTNumberLiteral

public ASTNumberLiteral(Parser p,
                        int id)
Method Detail

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 visitor
data - 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.