edu.mit.ai.psg.jevaES
Class JNEAssignmentExpression

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.JNEAssignmentExpression

public class JNEAssignmentExpression
extends ExpressionNode
implements JevaESParserConstants

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; x = 1.0;" is not ok, but "int x; x += 1.0;" is ok.

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)
          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()
           
 
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

getTargetStoreNode

public IExpressionStoreNode getTargetStoreNode()

getAssignmentOperatorNode

public JNEAssignmentOperator getAssignmentOperatorNode()

getSourceExpressionNode

public IExpressionNode getSourceExpressionNode()

computeType

public Class computeType(IEnv env)
                  throws VerifyingException
Type is the type of the assignment target
Overrides:
computeType in class ExpressionNode

computeIsConstant

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

eval

public Object eval(IEnv env)
            throws ThrowException
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.
Overrides:
eval in class ExpressionNode

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-bugs@ai.mit.edu