edu.mit.ai.psg.jeva
Class EnvProcedureBoundary
java.lang.Object
|
+--edu.mit.ai.psg.jeva.EnvBase
|
+--edu.mit.ai.psg.jeva.EnvProcedureBoundary
- public class EnvProcedureBoundary
- extends EnvBase
Env used at procedure-like boundaries so lookupLocal does not look any
farther for local variable names. Used for methods, constructors, field
initializers, and other initializers.
(lookupLocal is lookup restricted to locals and parameters of a method,
used for checking if a local variable name is already in use.
[JavaLangSpec1.0sec14.3.2])
Captures method or constructor
for checking return type and checked exceptions.
|
Method Summary |
boolean |
lookupLabel(String queryName)
|
IStore |
lookupLocal(String queryName)
lookup restricted to local variables and parameters,
e.g., to check if a local variable name is already in use. |
IClass |
lookupReturnType()
return type of enclosing method,
or void.class (wrapped) if in a constructor,
or null if in a static or object initializer |
IClass[] |
lookupThrows()
find checked exceptions caught in an enclosing try block or
declared in throws clause of enclosing method or constructor |
String |
toString()
|
EnvProcedureBoundary
public EnvProcedureBoundary(String methodName,
IMember methodOrConstructor,
IEnv nextEnv)
lookupLocal
public IStore lookupLocal(String queryName)
- Description copied from interface: IEnv
- lookup restricted to local variables and parameters,
e.g., to check 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]
- Overrides:
- lookupLocal in class EnvBase
lookupLabel
public boolean lookupLabel(String queryName)
lookupReturnType
public IClass lookupReturnType()
- Description copied from interface: IEnv
- return type of enclosing method,
or void.class (wrapped) if in a constructor,
or null if in a static or object initializer
- Overrides:
- lookupReturnType in class EnvBase
lookupThrows
public IClass[] lookupThrows()
- Description copied from interface: IEnv
- find checked exceptions caught in an enclosing try block or
declared in throws clause of enclosing method or constructor
- Overrides:
- lookupThrows in class EnvBase
toString
public String toString()
- Overrides:
- toString in class EnvBase