edu.mit.ai.psg.jevaES
Class JNELiteralExpression

java.lang.Object
  |
  +--edu.mit.ai.psg.jevaES.SimpleNode
        |
        +--edu.mit.ai.psg.jevaES.JevaNode
              |
              +--edu.mit.ai.psg.jevaES.ExpressionNode
                    |
                    +--edu.mit.ai.psg.jevaES.JNELiteralExpression

public class JNELiteralExpression
extends ExpressionNode

Jeva parse node for literal expressions (1, 3.14, "Hi", etc.)

Author:
CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998 Massachusetts Institute of Technology

Fields inherited from class edu.mit.ai.psg.jevaES.SimpleNode
children, id, parent
 
Method Summary
 boolean computeIsConstant(IEnv env)
           
 Class computeType(IEnv env)
           
 Object eval(IEnv env)
          This should never be called.
 void setValue(Object val, Class literalType)
           
 
Methods inherited from class edu.mit.ai.psg.jevaES.ExpressionNode
getType, getValue, isConstant
 
Methods inherited from class edu.mit.ai.psg.jevaES.JevaNode
getBeginToken, getEndToken, print, print, printToken, printToString, printToString, setBeginToken, setEndToken
 
Methods inherited from class edu.mit.ai.psg.jevaES.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setValue

public void setValue(Object val,
                     Class literalType)

computeIsConstant

public boolean computeIsConstant(IEnv env)
Overrides:
computeIsConstant in class ExpressionNode

computeType

public Class computeType(IEnv env)
Overrides:
computeType in class ExpressionNode

eval

public Object eval(IEnv env)
This should never be called. EvalMethods.eval calls getValue, which calls eval only if it isn't a constant already computed. Literals are computed at parse time, so they are always computed.
Overrides:
eval in class ExpressionNode

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-bugs@ai.mit.edu