|
|||||||||
| 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
|
+--edu.mit.ai.psg.jeva.JNEAssignmentExpression
Jeva parse Nodes for all assignment Expressions (=, +=, *=, etc.) [JavaLangSpec1.0 sec 15.25]. Note that assignment conversion is less powerful than casting conversion, so "int x=0; x = 1.0;" is not ok, but "int x=0; x += 1.0;" is ok.
| Fields inherited from class edu.mit.ai.psg.jeva.SimpleNode |
children,
id,
parent |
| Method Summary | |
boolean |
computeIsConstant(IEnv env)
Compute whether this expression is a constant (nodes should not call this method directly). |
IClass |
computeType(IEnv env)
Type is the type of the assignment target |
Object |
eval(IEnv env)
Eval must evaluate left side target before right side expression [JavaLangSpec1.0 sec 15.25] So left side returns a thunk to do the store. |
JNEAssignmentOperator |
getAssignmentOperatorNode()
|
IExpressionNode |
getSourceExpressionNode()
|
IExpressionStoreNode |
getTargetStoreNode()
|
Object |
jjtAccept(IJevaVisitor visitor,
Object data)
Accept a visitor. |
| Methods inherited from class edu.mit.ai.psg.jeva.ExpressionNode |
getType,
getType,
getValue,
isConstant |
| 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 |
| Method Detail |
public Object jjtAccept(IJevaVisitor visitor,
Object data)
return visitor.visit(this, data);which dispatches on the type of this to appropriate method of visitor
public IExpressionStoreNode getTargetStoreNode()
public JNEAssignmentOperator getAssignmentOperatorNode()
public IExpressionNode getSourceExpressionNode()
public IClass computeType(IEnv env)
throws VerifyingException
env - environment of name bindings, etc.EvalMethods.getType(IExpressionNode, IEnv)public boolean computeIsConstant(IEnv env)
env - environment of name bindings, etc.ExpressionNode.isConstant(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.isConstant(IExpressionNode, IEnv)
public Object eval(IEnv env)
throws ThrowException
env - environment of name bindings, etc.ExpressionNode.getValue(edu.mit.ai.psg.jeva.IEnv),
EvalMethods.eval(IExpressionNode, IEnv)
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-feedback@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||