org.mvel
Class ASTNode

java.lang.Object
  extended by org.mvel.ASTNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
And, AssertNode, AssignAdd, AssignDiv, AssignmentNode, AssignMult, AssignSub, BinaryOperation, BlockNode, ContextDeepPropertyNode, DeepAssignmentNode, EndOfStatement, IfNode, ImportNode, InlineCollectionNode, InterceptorWrapper, LineLabel, LiteralDeepPropertyNode, LiteralNode, NewObjectNode, Or, PostFixDecNode, PostFixIncNode, PreFixDecNode, PreFixIncNode, PropertyASTNode, RegExMatch, ReturnNode, StaticImportNode, Substatement, ThisValDeepPropertyNode, ThisValNode, TypeCast, TypedVarNode, Union, VariableDeepPropertyNode, VarPropertyNode

public class ASTNode
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  Accessor accessor
           
static int ASSIGN
           
static int BLOCK_FOREACH
           
static int BLOCK_IF
           
static int BLOCK_WHILE
           
static int BLOCK_WITH
           
static int COLLECTION
           
static int COMPILE_IMMEDIATE
           
protected  int cursorPosition
           
static int DEEP_PROPERTY
           
protected  boolean discard
           
protected  java.lang.Class egressType
           
protected  int endOfName
           
protected  int fields
           
protected  int firstUnion
           
static int FOLD
           
static int IDENTIFIER
           
static int INLINE_COLLECTION
           
static int INTEGER32
           
protected  int intRegister
           
static int INVERT
           
protected  java.lang.Object literal
           
static int LITERAL
           
static int LOOKAHEAD
           
static int METHOD
           
protected  char[] name
           
protected  java.lang.String nameCache
           
static int NEGATION
           
 ASTNode nextASTNode
           
static int NUMERIC
           
static int OPERATOR
           
static int STR_LITERAL
           
static int THISREF
           
 
Constructor Summary
ASTNode()
           
ASTNode(char[] expr, int fields)
           
ASTNode(char[] expr, int start, int end, int fields)
           
ASTNode(int fields, java.lang.Object literalValue)
           
 
Method Summary
 void discard()
           
 java.lang.String getAbsoluteName()
           
protected  java.lang.String getAbsoluteRemainder()
           
protected  java.lang.String getAbsoluteRootElement()
           
 Accessor getAccessor()
           
 int getCursorPosition()
           
 java.lang.Class getEgressType()
           
 int getFields()
           
 int getIntRegister()
           
 java.lang.Object getLiteralValue()
           
 java.lang.String getName()
           
 char[] getNameAsArray()
           
 java.lang.Integer getOperator()
           
 java.lang.Object getReducedValue(java.lang.Object ctx, java.lang.Object thisValue, VariableResolverFactory factory)
           
 java.lang.Object getReducedValueAccelerated(java.lang.Object ctx, java.lang.Object thisValue, VariableResolverFactory factory)
           
 boolean isAssignment()
           
protected  boolean isCollection()
           
 boolean isDebuggingSymbol()
           
 boolean isDeepProperty()
           
 boolean isDiscard()
           
 boolean isIdentifier()
           
 boolean isLiteral()
           
 boolean isOperator()
           
 boolean isOperator(java.lang.Integer operator)
           
 boolean isThisVal()
           
 void setAccessor(Accessor accessor)
           
 void setAsLiteral()
           
 void setCursorPosition(int cursorPosition)
           
 void setDiscard(boolean discard)
           
 void setEgressType(java.lang.Class egressType)
           
 void setIntRegister(int intRegister)
           
 void setLiteralValue(java.lang.Object literal)
           
protected  void setName(char[] name)
           
 java.lang.String toString()
           
protected  java.lang.Object tryStaticAccess(java.lang.Object thisRef, VariableResolverFactory factory)
           
protected  java.lang.Object valRet(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LITERAL

public static final int LITERAL
See Also:
Constant Field Values

DEEP_PROPERTY

public static final int DEEP_PROPERTY
See Also:
Constant Field Values

OPERATOR

public static final int OPERATOR
See Also:
Constant Field Values

IDENTIFIER

public static final int IDENTIFIER
See Also:
Constant Field Values

COMPILE_IMMEDIATE

public static final int COMPILE_IMMEDIATE
See Also:
Constant Field Values

NUMERIC

public static final int NUMERIC
See Also:
Constant Field Values

NEGATION

public static final int NEGATION
See Also:
Constant Field Values

INVERT

public static final int INVERT
See Also:
Constant Field Values

FOLD

public static final int FOLD
See Also:
Constant Field Values

METHOD

public static final int METHOD
See Also:
Constant Field Values

ASSIGN

public static final int ASSIGN
See Also:
Constant Field Values

LOOKAHEAD

public static final int LOOKAHEAD
See Also:
Constant Field Values

COLLECTION

public static final int COLLECTION
See Also:
Constant Field Values

THISREF

public static final int THISREF
See Also:
Constant Field Values

INLINE_COLLECTION

public static final int INLINE_COLLECTION
See Also:
Constant Field Values

STR_LITERAL

public static final int STR_LITERAL
See Also:
Constant Field Values

BLOCK_IF

public static final int BLOCK_IF
See Also:
Constant Field Values

BLOCK_FOREACH

public static final int BLOCK_FOREACH
See Also:
Constant Field Values

BLOCK_WITH

public static final int BLOCK_WITH
See Also:
Constant Field Values

BLOCK_WHILE

public static final int BLOCK_WHILE
See Also:
Constant Field Values

INTEGER32

public static final int INTEGER32
See Also:
Constant Field Values

firstUnion

protected int firstUnion

endOfName

protected int endOfName

fields

protected int fields

egressType

protected java.lang.Class egressType

name

protected char[] name

nameCache

protected java.lang.String nameCache

literal

protected java.lang.Object literal

accessor

protected transient Accessor accessor

cursorPosition

protected int cursorPosition

nextASTNode

public ASTNode nextASTNode

discard

protected boolean discard

intRegister

protected int intRegister
Constructor Detail

ASTNode

public ASTNode()

ASTNode

public ASTNode(char[] expr,
               int start,
               int end,
               int fields)

ASTNode

public ASTNode(char[] expr,
               int fields)

ASTNode

public ASTNode(int fields,
               java.lang.Object literalValue)
Method Detail

getAbsoluteRootElement

protected java.lang.String getAbsoluteRootElement()

getEgressType

public java.lang.Class getEgressType()

setEgressType

public void setEgressType(java.lang.Class egressType)

getAbsoluteRemainder

protected java.lang.String getAbsoluteRemainder()

getNameAsArray

public char[] getNameAsArray()

getAbsoluteName

public java.lang.String getAbsoluteName()

getName

public java.lang.String getName()

getLiteralValue

public java.lang.Object getLiteralValue()

setLiteralValue

public void setLiteralValue(java.lang.Object literal)

getReducedValueAccelerated

public java.lang.Object getReducedValueAccelerated(java.lang.Object ctx,
                                                   java.lang.Object thisValue,
                                                   VariableResolverFactory factory)

getReducedValue

public java.lang.Object getReducedValue(java.lang.Object ctx,
                                        java.lang.Object thisValue,
                                        VariableResolverFactory factory)

valRet

protected java.lang.Object valRet(java.lang.Object value)

tryStaticAccess

protected java.lang.Object tryStaticAccess(java.lang.Object thisRef,
                                           VariableResolverFactory factory)

setName

protected void setName(char[] name)

setAccessor

public void setAccessor(Accessor accessor)

isIdentifier

public boolean isIdentifier()

isLiteral

public boolean isLiteral()

isThisVal

public boolean isThisVal()

isOperator

public boolean isOperator()

isOperator

public boolean isOperator(java.lang.Integer operator)

getOperator

public java.lang.Integer getOperator()

isCollection

protected boolean isCollection()

isAssignment

public boolean isAssignment()

isDeepProperty

public boolean isDeepProperty()

setAsLiteral

public void setAsLiteral()

getCursorPosition

public int getCursorPosition()

setCursorPosition

public void setCursorPosition(int cursorPosition)

isDiscard

public boolean isDiscard()

setDiscard

public void setDiscard(boolean discard)

discard

public void discard()

isDebuggingSymbol

public boolean isDebuggingSymbol()

getIntRegister

public int getIntRegister()

setIntRegister

public void setIntRegister(int intRegister)

getFields

public int getFields()

getAccessor

public Accessor getAccessor()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object