edu.mit.ai.psg.jeva
Class JNDClassDeclaration

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

public class JNDClassDeclaration
extends JevaNode
implements IDeclarationNode, IClassBodyDeclaration, JevaParserConstants

JNDClassDeclaration: Parse node for class and interface declarations.

See Also:
IDeclarationNode

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
 void computeTypeSignatures(IEnv env)
           
 void ensureVerified()
           
 IEnv eval(IEnv env)
          Evaluate this Statement; don't call this directly, use EvalMethods.eval(IStatementNode, IEnv) Every statement needs to implement an eval method.
protected  void evalObjectInitializations(Object obj, IEnv classEnv)
           
 JNDClassBody getBodyNode()
           
 String getFullName()
           
 InterpretedClass getIClass()
           
 JNNameList getInterfaceNamesNode()
           
 String getSimpleName()
           
 JNName getSuperclassNameNode()
           
 Object jjtAccept(IJevaVisitor visitor, Object data)
          Accept a visitor.
protected  IEnv runInitializations(Vector initializations, IEnv env)
           
 IEnv scanDeclarations(IEnv env)
           
 IEnv verifyTypes(IEnv env)
          Verify types within this statement; don't call this directly, use EvalMethods.verifyTypes(IStatementNode, IEnv).
 
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

getIClass

public InterpretedClass getIClass()

getBodyNode

public JNDClassBody getBodyNode()

getSimpleName

public String getSimpleName()

getFullName

public String getFullName()

getSuperclassNameNode

public JNName getSuperclassNameNode()

getInterfaceNamesNode

public JNNameList getInterfaceNamesNode()

scanDeclarations

public IEnv scanDeclarations(IEnv env)
                      throws VerifyingException
Specified by:
scanDeclarations in interface IDeclarationNode
See Also:
IDeclarationNode

computeTypeSignatures

public void computeTypeSignatures(IEnv env)
                           throws VerifyingException
Specified by:
computeTypeSignatures in interface IDeclarationNode
See Also:
IDeclarationNode

verifyTypes

public IEnv verifyTypes(IEnv env)
                 throws VerifyingException
Description copied from interface: IStatementNode
Verify types within this statement; don't call this directly, use EvalMethods.verifyTypes(IStatementNode, IEnv). Builds env without evaluating anything with side effects, for the purpose of verifying types of later statements. May be used by preprocessors which must find the type of an expression in order to assign it to a new variable.
Specified by:
verifyTypes in interface IDeclarationNode
See Also:
IDeclarationNode

ensureVerified

public void ensureVerified()
                    throws VerifyingException

eval

public IEnv eval(IEnv env)
Description copied from interface: IStatementNode
Evaluate this Statement; don't call this directly, use EvalMethods.eval(IStatementNode, IEnv) Every statement needs to implement an eval method.
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)

evalObjectInitializations

protected void evalObjectInitializations(Object obj,
                                         IEnv classEnv)
                                  throws ThrowException

runInitializations

protected IEnv runInitializations(Vector initializations,
                                  IEnv env)
                           throws ThrowException

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu