kmy.jint.tree
Class ConstNode

java.lang.Object
  |
  +--kmy.jint.tree.BasicNode
        |
        +--kmy.jint.tree.ExpressionNode
              |
              +--kmy.jint.tree.ConstNode

public class ConstNode
extends ExpressionNode


Field Summary
 java.lang.Object val
           
 
Fields inherited from class kmy.jint.tree.ExpressionNode
clazz, NOT_CONST
 
Fields inherited from class kmy.jint.tree.BasicNode
attachment, filePos
 
Constructor Summary
ConstNode(int filePos, java.lang.Object val)
           
 
Method Summary
 java.lang.Object eval(Context context)
          Calls corresponding eval* method in the given Context.
 java.lang.Object getConstValue()
          Returns value of this expression (wrapped in the corresponding java class if value is primitive).
 
Methods inherited from class kmy.jint.tree.BasicNode
getAttachment, getFilePos, getLine, setAttachment, setFilePos, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

val

public java.lang.Object val
Constructor Detail

ConstNode

public ConstNode(int filePos,
                 java.lang.Object val)
Method Detail

eval

public java.lang.Object eval(Context context)
Description copied from class: BasicNode
Calls corresponding eval* method in the given Context.
Overrides:
eval in class BasicNode

getConstValue

public java.lang.Object getConstValue()
Description copied from class: ExpressionNode
Returns value of this expression (wrapped in the corresponding java class if value is primitive). If this expression is not constant, returns ExpressionNode.NOT_CONST.
Overrides:
getConstValue in class ExpressionNode