edu.mit.ai.psg.jeva
Class JNSExplicitConstructorInvocation

java.lang.Object
  |
  +--edu.mit.ai.psg.jeva.SimpleNode
        |
        +--edu.mit.ai.psg.jeva.JevaNode
              |
              +--edu.mit.ai.psg.jeva.JNSExplicitConstructorInvocation

public class JNSExplicitConstructorInvocation
extends JevaNode
implements IStatementNode, JevaParserConstants

Jeva parse node for this(...) or super(...) constructor invocations. [JavaLangSpec1.0 sec8.6.5 Constructor Body]


Fields inherited from class edu.mit.ai.psg.jeva.SimpleNode
children, id, parent
 
Fields inherited from interface edu.mit.ai.psg.jeva.JevaParserConstants
_DEFAULT, ABSTRACT, ANDASSIGN, ASSIGN, BANG, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DO, DOT, DOUBLE, ELSE, EOF, EQ, EXPONENT, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LE, LETTER, LONG, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_LITERAL, ORASSIGN, PACKAGE, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE, WHITE_SPACE, XOR, XORASSIGN
 
Method Summary
 IEnv eval(IEnv env)
          Throws Error, as interpreter should never call this.
 Object evalArgumentAt(int index, IEnv env)
           
 JNEArguments getArgumentsNode()
           
protected  void initConstructorSignature(IEnv env)
          [JavaLangSpec1.0 sec8.6.5 Constructor Body] Constructor selection is similar to method selection.
 Object jjtAccept(IJevaVisitor visitor, Object data)
          Accept a visitor.
 IEnv verifyTypes(IEnv env)
          Explicit Constructor invocations must appear as the first statement of a constructor, and may not refer to fields of the class (which are not initialized yet).
 
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

getArgumentsNode

public JNEArguments getArgumentsNode()

verifyTypes

public IEnv verifyTypes(IEnv env)
                 throws VerifyingException
Explicit Constructor invocations must appear as the first statement of a constructor, and may not refer to fields of the class (which are not initialized yet). Rely on constructor to provide an appropriate environent with method parameters but no fields.
Specified by:
verifyTypes in interface IStatementNode
Tags copied from interface: IStatementNode
Parameters:
env - environment of names bindings.
Returns:
env or possibly extended env
Throws:
VerifyingException - if statement is illegal
See Also:
EvalMethods.verifyTypes(IStatementNode, IEnv)

eval

public IEnv eval(IEnv env)
          throws ThrowException
Throws Error, as interpreter should never call this. (See GenerateProxyClass to see how ExplicitConstructorInvocations are implemented.)
Specified by:
eval in interface IStatementNode
Tags copied from interface: IStatementNode
Parameters:
env - environment of names bindings.
Returns:
env or possibly extended env
Throws:
AbruptCompletionException - if abruptly completed with return, throw, break, or continue.
See Also:
EvalMethods.eval(IStatementNode, IEnv)

evalArgumentAt

public Object evalArgumentAt(int index,
                             IEnv env)
                      throws ThrowException

initConstructorSignature

protected void initConstructorSignature(IEnv env)
                                 throws VerifyingException
[JavaLangSpec1.0 sec8.6.5 Constructor Body] Constructor selection is similar to method selection.

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu