edu.mit.ai.psg.jeva
Class JNCompilationUnit

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

public class JNCompilationUnit
extends JevaNode

JNCompilationUnit: parse node for a compilation unit, typically a source (.java) file.

Author:
CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998, 1999 Massachusetts Institute of Technology

Fields inherited from class edu.mit.ai.psg.jeva.SimpleNode
children, id, parent
 
Method Summary
 void computeTypeSignatures(IEnv env)
           
 void eval(String[] arguments, IEnv env)
          Eval finds the public static void main(String[]) method of the public class (there should be only one) and runs it.
 IDeclarationNode getDeclaration(int i)
           
 int getNumDeclarations()
           
 Object jjtAccept(IJevaVisitor visitor, Object data)
           
 IEnv scanDeclarations(IEnv env)
           
 IEnv verifyTypes(IEnv env)
           
 
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, print, print, printToken, printToString, printToString, removeChild, removeChildTokens, replaceChild, replaceChild, setBeginToken, setEndToken, 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)
Overrides:
jjtAccept in class JevaNode

getDeclaration

public final IDeclarationNode getDeclaration(int i)

getNumDeclarations

public final int getNumDeclarations()

scanDeclarations

public IEnv scanDeclarations(IEnv env)
                      throws VerifyingException

computeTypeSignatures

public void computeTypeSignatures(IEnv env)
                           throws VerifyingException

verifyTypes

public IEnv verifyTypes(IEnv env)
                 throws VerifyingException

eval

public void eval(String[] arguments,
                 IEnv env)
          throws ClassNotFoundException,
                 ThrowException
Eval finds the public static void main(String[]) method of the public class (there should be only one) and runs it.
Throws:
ClassNotFoundException - if no public class with main method found.
ThrowException - if method throws exception.

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-bugs@ai.mit.edu