edu.mit.ai.psg.jevaES
Class EnvLocalStore
java.lang.Object
|
+--edu.mit.ai.psg.jevaES.EnvBase
|
+--edu.mit.ai.psg.jevaES.EnvLocalStore
- public class EnvLocalStore
- extends EnvBase
- implements IStore, IEnv
LocalStore implements storage for a local variable in an environment chain.
See JevaES.extendEnv(...) for public interface.
- See Also:
JevaES.extendEnv(Class, String, Object, IEnv)
EnvLocalStore
protected EnvLocalStore(boolean isFinal,
boolean isConstant,
Class type,
String name,
IEnv nextEnv)
getName
public String getName()
getType
public Class 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,
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
- Overrides:
- lookupLocal in class EnvBase
toString
public String toString()
- Overrides:
- toString in class EnvBase