|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.mit.ai.psg.jeva.SimpleNode
|
+--edu.mit.ai.psg.jeva.JevaNode
|
+--edu.mit.ai.psg.jeva.ExpressionNode
A base class for Expressions which caches its type (and value if constant).
Nodes should not call its methods directly, but instead use
EvalMethods to capture errors into an EvaluatingError.
| Fields inherited from class edu.mit.ai.psg.jeva.SimpleNode |
children,
id,
parent |
| Constructor Summary | |
ExpressionNode(int id)
Creates an ExpressionNode with the given JevaParseTreeConstants ID |
|
| Method Summary | |
abstract boolean |
computeIsConstant(IEnv env)
Compute whether this expression is a constant (nodes should not call this method directly). |
abstract IClass |
computeType(IEnv env)
Compute the static type of the expression (nodes should not call this method directly). |
abstract Object |
eval(IEnv env)
Evaluate this expression (nodes should not call this method directly). |
IClass |
getType()
Return the cached type of the expression. |
IClass |
getType(IEnv env)
Return the static type of the expression (nodes should not call this method directly). |
Object |
getValue(IEnv env)
Get the value of this node (nodes should not call this method directly). |
boolean |
isConstant(IEnv env)
Test whether this is a compile-time constant expression (nodes should not call this method directly). |
| Methods inherited from class edu.mit.ai.psg.jeva.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 |
| Constructor Detail |
public ExpressionNode(int id)
| Method Detail |
public final IClass getType(IEnv env)
throws VerifyingException
env - environment of name bindings, etc.computeType(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.getType(IExpressionNode, IEnv)public final IClass getType()
public abstract IClass computeType(IEnv env)
throws VerifyingException
env - environment of name bindings, etc.EvalMethods.getType(IExpressionNode, IEnv)
public final boolean isConstant(IEnv env)
throws VerifyingException
env - environment of name bindings, etc.computeIsConstant(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.isConstant(IExpressionNode, IEnv)
public abstract boolean computeIsConstant(IEnv env)
throws VerifyingException
env - environment of name bindings, etc.isConstant(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.isConstant(IExpressionNode, IEnv)
public final Object getValue(IEnv env)
throws ThrowException
env - environment of name bindings, etc.eval(edu.mit.ai.psg.jeva.IEnv),
isConstant(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.eval(IExpressionNode, IEnv)
public abstract Object eval(IEnv env)
throws ThrowException
env - environment of name bindings, etc.getValue(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.eval(IExpressionNode, IEnv)
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-bugs@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||