edu.mit.ai.psg.jevaES
Class EnvEnd

java.lang.Object
  |
  +--edu.mit.ai.psg.jevaES.EnvEnd

public class EnvEnd
extends Object
implements IEnv

A tail environment node that holds the root package.


Inner classes inherited from class edu.mit.ai.psg.jevaES.IEnv
IEnv.ClassResult
 
Method Summary
 IEnv getNext()
          get next env in chain; used by lookup methods
 int getOptionBits()
          get option bits; for options, see Jeva
 IEnv.ClassResult lookupClass(String queryName)
          find root class with this name; nested classes found from parent.
 IPackage lookupEnclosingPackage()
          return enclosing package
 IStatementNode lookupLabel(String queryName, boolean isForContinue)
          if label found, return node of statement it labels; stops at method or initializer boundary.
 IStore lookupLocal(String queryName)
          lookup restricted to local variables and parameters, used for checking if a local variable name is already in use.
 IPackage lookupPackage(String firstPackageName)
          find root package with this name; sub-packages found from parent
 Class lookupReturnType()
          return type of enclosing method, or void.class if in a constructor, or null if in a static initializer
 Class[] lookupThrows()
          find checked exceptions declared in throws clause of enclosing method or constructor, or null if not in a method or constructor
static IEnv makeDefaultEnv(int initOptions)
          options default is 0; for explanation see JevaES
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

makeDefaultEnv

public static IEnv makeDefaultEnv(int initOptions)
options default is 0; for explanation see JevaES

toString

public String toString()
Overrides:
toString in class Object

lookupLocal

public IStore lookupLocal(String queryName)
Description copied from interface: IEnv
lookup restricted to local variables and parameters, used for checking if a local variable name is already in use. Local scope may be a method, constructor, field initializer, static initializer, object initializer. [JavaLangSpec1.0sec14.3.2]
Specified by:
lookupLocal in interface IEnv

lookupLabel

public IStatementNode lookupLabel(String queryName,
                                  boolean isForContinue)
Description copied from interface: IEnv
if label found, return node of statement it labels; stops at method or initializer boundary. If label is empty (""), then returns first for, do, while, or switch statement. If isForContinue, then skip unlabeled switch statements.
Specified by:
lookupLabel in interface IEnv

lookupClass

public IEnv.ClassResult lookupClass(String queryName)
Description copied from interface: IEnv
find root class with this name; nested classes found from parent. Returns IEnv.ClassResult if found, else null;
Specified by:
lookupClass in interface IEnv
Tags copied from interface: IEnv
Throws:
IllegalArgumentException - if two on-demand-imports import different classes named queryName.

lookupPackage

public IPackage lookupPackage(String firstPackageName)
Description copied from interface: IEnv
find root package with this name; sub-packages found from parent
Specified by:
lookupPackage in interface IEnv

lookupReturnType

public Class lookupReturnType()
Description copied from interface: IEnv
return type of enclosing method, or void.class if in a constructor, or null if in a static initializer
Specified by:
lookupReturnType in interface IEnv

lookupThrows

public Class[] lookupThrows()
Description copied from interface: IEnv
find checked exceptions declared in throws clause of enclosing method or constructor, or null if not in a method or constructor
Specified by:
lookupThrows in interface IEnv

lookupEnclosingPackage

public IPackage lookupEnclosingPackage()
Description copied from interface: IEnv
return enclosing package
Specified by:
lookupEnclosingPackage in interface IEnv

getOptionBits

public int getOptionBits()
Description copied from interface: IEnv
get option bits; for options, see Jeva
Specified by:
getOptionBits in interface IEnv

getNext

public IEnv getNext()
Description copied from interface: IEnv
get next env in chain; used by lookup methods
Specified by:
getNext in interface IEnv

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu