edu.mit.ai.psg.jevaES
Class JNEArrayAccessExpression

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

public class JNEArrayAccessExpression
extends ExpressionNode
implements IExpressionStoreNode

Jeva parse Node for array[index] Expressions [JavaLangSpec1.0 sec15.12 Array Access Expressions].


Fields inherited from class edu.mit.ai.psg.jevaES.SimpleNode
children, id, parent
 
Method Summary
 boolean computeIsConstant(IEnv env)
          Compute whether this expression is a constant (nodes should not call this method directly).
 Class computeType(IEnv env)
          computeType also does "compile time" one-time type checks as well.
 Object eval(IEnv env)
          Evaluate this expression (nodes should not call this method directly).
 IStore evalToStore(IEnv env)
          Used by assignment.
 IExpressionNode getArrayExpressionNode()
           
 IExpressionNode getIndexExpressionNode()
           
 
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, notVerified, print, print, printToken, printToString, printToString, setBeginToken, setEndToken, shouldNotHappen, shouldNotHappen, shouldNotHappen
 
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

getArrayExpressionNode

public IExpressionNode getArrayExpressionNode()

getIndexExpressionNode

public IExpressionNode getIndexExpressionNode()

computeType

public Class computeType(IEnv env)
                  throws VerifyingException
computeType also does "compile time" one-time type checks as well. [JavaLangSpec1.0 sec10.4 Array Access]
Overrides:
computeType in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Throws:
VerifyingException - if expression is illegal
See Also:
EvalMethods.getType(IExpressionNode, IEnv)

computeIsConstant

public boolean computeIsConstant(IEnv env)
                          throws VerifyingException
Description copied from class: ExpressionNode
Compute whether this expression is a constant (nodes should not call this method directly). Called by the isConstant method.
Overrides:
computeIsConstant in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Throws:
VerifyingException - if expression is illegal.
See Also:
ExpressionNode.isConstant(edu.mit.ai.psg.jevaES.IEnv), EvalMethods.isConstant(IExpressionNode, IEnv)

eval

public Object eval(IEnv env)
            throws ThrowException
Description copied from class: ExpressionNode
Evaluate this expression (nodes should not call this method directly). Called by the getValue method.
Overrides:
eval in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Throws:
ThrowException - if abruptly completed with an exception
See Also:
ExpressionNode.getValue(edu.mit.ai.psg.jevaES.IEnv), EvalMethods.eval(IExpressionNode, IEnv)

evalToStore

public IStore evalToStore(IEnv env)
                   throws ThrowException
Used by assignment. ArrayExpr must be evaluated before indexExpr [JavaLangSpec1.0 sec15.12 Array Access Expressions]
Specified by:
evalToStore in interface IExpressionStoreNode
Tags copied from interface: IExpressionStoreNode
Throws:
ThrowException - if completes abruptly with an exception

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu