edu.mit.ai.psg.jeva
Class EnvLocalStore
java.lang.Object
|
+--edu.mit.ai.psg.jeva.EnvBase
|
+--edu.mit.ai.psg.jeva.EnvLocalStore
- public class EnvLocalStore
- extends EnvBase
- implements IStore, IEnv
LocalStore implements storage for a local variable in an environment chain.
| Methods inherited from class edu.mit.ai.psg.jeva.EnvBase |
getNext,
getOptionBits,
lookupClass,
lookupEnclosingClass,
lookupEnclosingPackage,
lookupField,
lookupLabel,
lookupPackage,
lookupReturnType,
lookupThis,
lookupThrows |
EnvLocalStore
protected EnvLocalStore(boolean isFinal,
boolean isConstant,
IClass type,
String name,
IEnv nextEnv)
getName
public String getName()
getType
public IClass getType()
- Specified by:
- getType in interface IStore
isFinal
public boolean isFinal()
- Specified by:
- isFinal in interface IStore
isConstant
public boolean isConstant()
- Specified by:
- isConstant in interface IStore
getValue
public Object getValue()
- throws IllegalStateException if not initialized.
An uninitialized variable might be accessed through
an initializer that references the var it is initializing
[JavaLangSpec1.0sec14.3.2].
- Specified by:
- getValue in interface IStore
setValue
public void setValue(Object newValue)
throws ThrowException
- Specified by:
- setValue in interface IStore
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]
- Specified by:
- lookupLocal in interface IEnv
- Overrides:
- lookupLocal in class EnvBase
toString
public String toString()
- Overrides:
- toString in class EnvBase