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.


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.
 long getDate()
           
 IDeclarationNode getDeclaration(int i)
           
 int getNumDeclarations()
           
 Object jjtAccept(IJevaVisitor visitor, Object data)
          Accept a visitor.
 IEnv scanDeclarations(IEnv env)
           
 void setDate(long date)
           
 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, 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 class: JevaNode
Accept a visitor. For Visitor design pattern.
Overrides:
jjtAccept in class JevaNode

getDate

public long getDate()

setDate

public void setDate(long date)

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-feedback@ai.mit.edu