edu.mit.ai.psg.jeva
Class JNEMethodInvocationExpression

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

public class JNEMethodInvocationExpression
extends ExpressionNode

Jeva parse node for Method invocation expressions: target.method(args...) [JavaLangSpec 1.0 sec 15.11 Method Invocation Expressions]. Uses type of target expression to determine signature of method to be called. The implementation of this signature may be overridden by subclasses of this type, so the type of the actual target value is also needed.


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)
          Compute the static type of the expression (nodes should not call this method directly).
 Object eval(IEnv env)
          Evaluate this expression (nodes should not call this method directly).
 JNEArguments getArgumentExpressions()
           
 IMethod getMethodSignature()
           
 IExpressionNode getTargetExpression()
          Returns target expression if there is one, or may return null if target is impliict, or if calling a static method (ClassName.method())
protected  void initMethodSignature(IEnv env)
           
 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.JevaNode
checkInsertionPoint, find2ndTokenBeforeEndBody, findChildIndex, findPrecedingToken, findTokenBeforeChild, findTokenBeforeChild, findTokenBeforeEnd, getBeginToken, getEndToken, insertChildTokens, insertNewChildAfter, insertNewChildAt, insertNewChildBefore, jnGetChild, jnGetParent, notVerified, print, print, printSpecialTokens, printToken, printToString, printToString, removeChild, removeChildTokens, replaceChild, replaceChild, setBeginToken, setEndToken, shouldNotHappen, shouldNotHappen, shouldNotHappen, updateEndTokens, updateEndTokensPriorChild, updateEndTokensPriorNode, updateEndTokensPriorNode
 
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

jjtAccept

public Object jjtAccept(IJevaVisitor visitor,
                        Object data)
Description copied from interface: IJevaNode
Accept a visitor. For visitor design pattern: jjtAccept must simply
  return visitor.visit(this, data);  
which dispatches on the type of this to appropriate method of visitor
Overrides:
jjtAccept in class JevaNode

getMethodSignature

public IMethod getMethodSignature()

getTargetExpression

public IExpressionNode getTargetExpression()
Returns target expression if there is one, or may return null if target is impliict, or if calling a static method (ClassName.method())

getArgumentExpressions

public JNEArguments getArgumentExpressions()

computeType

public IClass computeType(IEnv env)
                   throws VerifyingException
Description copied from class: ExpressionNode
Compute the static type of the expression (nodes should not call this method directly). Called by getType.
Overrides:
computeType in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Returns:
the IClass of the static type.
Throws:
VerifyingException - if expression is illegal
See Also:
EvalMethods.getType(IExpressionNode, IEnv)

computeIsConstant

public boolean computeIsConstant(IEnv env)
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.jeva.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.jeva.IEnv), EvalMethods.eval(IExpressionNode, IEnv)

initMethodSignature

protected void initMethodSignature(IEnv env)
                            throws VerifyingException

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu