public class SimpleEnvironment extends Environment
Environment
.
(Should consider merging this code with Table2D.)curEnvironment, INDIRECT_DEFINES
nameKey
Constructor and Description |
---|
SimpleEnvironment() |
SimpleEnvironment(int capacity) |
SimpleEnvironment(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
NamedLocation |
addLocation(Symbol name,
java.lang.Object property,
Location loc) |
protected NamedLocation |
addUnboundLocation(Symbol name,
java.lang.Object property,
int hash) |
NamedLocation |
define(Symbol sym,
java.lang.Object property,
int hash,
java.lang.Object newValue) |
void |
define(Symbol sym,
java.lang.Object property,
java.lang.Object newValue) |
java.util.Set |
entrySet() |
LocationEnumeration |
enumerateAllLocations()
Does enumerate inherited Locations.
|
LocationEnumeration |
enumerateLocations()
Does not enumerate inherited Locations.
|
static Location |
getCurrentLocation(java.lang.String name) |
NamedLocation |
getLocation(Symbol name,
java.lang.Object property,
int hash,
boolean create) |
protected boolean |
hasMoreElements(LocationEnumeration it) |
static java.lang.Object |
lookup_global(Symbol name) |
NamedLocation |
lookup(Symbol name,
java.lang.Object property,
int hash) |
NamedLocation |
lookupDirect(Symbol name,
java.lang.Object property,
int hash) |
protected NamedLocation |
newLocation(Symbol name,
java.lang.Object property) |
void |
put(Symbol key,
java.lang.Object property,
java.lang.Object newValue) |
void |
readExternal(java.io.ObjectInput in) |
java.lang.Object |
readResolve() |
protected void |
redefineError(Symbol name,
java.lang.Object property,
Location loc) |
int |
size()
Size does not include inherited Locations.
|
protected void |
toStringBase(java.lang.StringBuffer sbuf) |
java.lang.String |
toStringVerbose()
Overridden in sub-classes - useful for more verbose debug output.
|
Location |
unlink(Symbol symbol,
java.lang.Object property,
int hash)
Remove Location from this Environment.
|
void |
writeExternal(java.io.ObjectOutput out) |
addLocation, addLocation, containsKey, current, defaultNamespace, get, get, get, get, get, getCanDefine, getCanRedefine, getChecked, getCurrent, getFlags, getFunction, getFunction, getGlobal, getInstance, getLocation, getLocation, getLocation, getLocation, getSymbol, isBound, isBound, isLocked, lookup, lookup, make, make, make, put, put, put, putFunction, remove, remove, remove, remove, remove, removeFunction, restoreCurrent, setCanDefine, setCanRedefine, setCurrent, setFlag, setGlobal, setIndirectDefines, setLocked, setSaveCurrent, toString, user
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
public SimpleEnvironment()
public SimpleEnvironment(java.lang.String name)
public SimpleEnvironment(int capacity)
public int size()
public static Location getCurrentLocation(java.lang.String name)
public static java.lang.Object lookup_global(Symbol name) throws UnboundLocationException
UnboundLocationException
public NamedLocation lookup(Symbol name, java.lang.Object property, int hash)
lookup
in class Environment
public NamedLocation lookupDirect(Symbol name, java.lang.Object property, int hash)
public NamedLocation getLocation(Symbol name, java.lang.Object property, int hash, boolean create)
getLocation
in class Environment
protected NamedLocation addUnboundLocation(Symbol name, java.lang.Object property, int hash)
public void put(Symbol key, java.lang.Object property, java.lang.Object newValue)
put
in class Environment
protected NamedLocation newLocation(Symbol name, java.lang.Object property)
public NamedLocation define(Symbol sym, java.lang.Object property, int hash, java.lang.Object newValue)
public void define(Symbol sym, java.lang.Object property, java.lang.Object newValue)
define
in class Environment
public NamedLocation addLocation(Symbol name, java.lang.Object property, Location loc)
addLocation
in class Environment
public Location unlink(Symbol symbol, java.lang.Object property, int hash)
Environment
unlink
in class Environment
public LocationEnumeration enumerateLocations()
enumerateLocations
in class Environment
public LocationEnumeration enumerateAllLocations()
enumerateAllLocations
in class Environment
protected boolean hasMoreElements(LocationEnumeration it)
hasMoreElements
in class Environment
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public java.util.Set entrySet()
public java.lang.String toStringVerbose()
Environment
toStringVerbose
in class Environment
protected void toStringBase(java.lang.StringBuffer sbuf)