|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.ai.psg.jeva.EnvBase
A base class for Environment nodes that forwards all requests to the next environment node. Subclasses should override some methods to actually do some kinds of lookups. (Environments are chains of binding nodes).
| Inner classes inherited from class edu.mit.ai.psg.jeva.IEnv |
IEnv.ClassResult |
| Constructor Summary | |
EnvBase(IEnv nextEnv)
|
|
| Method Summary | |
IEnv |
getNext()
get next env in chain; used by lookup methods |
int |
getOptionBits()
get option bits; for options, see JevaES |
IEnv.ClassResult |
lookupClass(String queryName)
find root class with this name; nested classes found from parent. |
IClass |
lookupEnclosingClass()
return enclosing class, or null if not in a class. |
IPackage |
lookupEnclosingPackage()
return enclosing package |
IField |
lookupField(String queryName)
lookup field name in current class, or return null if no such field, or no current class. |
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, e.g., to check if a local variable name is already in use. |
IPackage |
lookupPackage(String rootPackageName)
find root package with this name; sub-packages found from parent |
IClass |
lookupReturnType()
return type of enclosing method, or void.class (wrapped) if in a constructor, or null if in a static or object initializer |
Object |
lookupThis()
return "this", or null if not in non-static context (method, constructor, non-static initializer) |
IClass[] |
lookupThrows()
find checked exceptions caught in an enclosing try block or declared in throws clause of enclosing method or constructor |
abstract String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public EnvBase(IEnv nextEnv)
throws IllegalArgumentException
| Method Detail |
public final IEnv getNext()
public abstract String toString()
public IStore lookupLocal(String queryName)
public IField lookupField(String queryName)
throws IllegalAccessException
public IStatementNode lookupLabel(String queryName,
boolean isForContinue)
public IEnv.ClassResult lookupClass(String queryName)
IEnv.ClassResult if found, else null;public IPackage lookupPackage(String rootPackageName)
public IClass lookupReturnType()
public IClass[] lookupThrows()
public Object lookupThis()
public IClass lookupEnclosingClass()
public IPackage lookupEnclosingPackage()
public int getOptionBits()
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-feedback@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||