| java.lang.Object gnu.mapping.PropertySet gnu.mapping.Environment
All known Subclasses: gnu.expr.BuiltinEnvironment, gnu.mapping.SimpleEnvironment,
Environment | abstract public class Environment extends PropertySet (Code) | | A mapping from EnvironmentKey to Location s.
An EnvironmentKey is either a Symbol or
a (Symbol , property)-pair.
|
Method Summary | |
final public void | addLocation(NamedLocation loc) | abstract public NamedLocation | addLocation(Symbol name, Object prop, Location loc) | final public void | addLocation(EnvironmentKey key, Location loc) | final public boolean | containsKey(Object key) | public static Environment | current() | public Namespace | defaultNamespace() | abstract public void | define(Symbol key, Object property, Object newValue) | abstract public LocationEnumeration | enumerateAllLocations() Does enumerate inherited Locations. | abstract public LocationEnumeration | enumerateLocations() Does not enumerate inherited Locations. | public Object | get(Symbol key, Object property, Object defaultValue) | final public Object | get(EnvironmentKey key, Object defaultValue) | final public Object | get(String key, Object defaultValue) | public Object | get(Symbol sym) | final public Object | get(Object key) Get the value bound to the given name. | public boolean | getCanDefine() True if new bindings (non-unbound Locations) can be added. | public boolean | getCanRedefine() True if bindings can be removed or replaced by other kinds of Location. | final public Object | getChecked(String name) Get the value bound to the given name. | public static Environment | getCurrent() | public int | getFlags() | final public Object | getFunction(Symbol key, Object defaultValue) | final public Object | getFunction(Symbol sym) | public static Environment | getGlobal() | public static Environment | getInstance(String name) | final public Location | getLocation(Symbol key, Object property) Return a location bound to (key, property).
Create new unbound Location if no such Location exists. | final public Location | getLocation(Symbol key) Return a location bound to key (and null property).
Create new unbound Location if no such Location exists. | abstract public NamedLocation | getLocation(Symbol key, Object property, int hash, boolean create) | final public NamedLocation | getLocation(Symbol name, Object property, boolean create) | final public Location | getLocation(Object key, boolean create) | public Symbol | getSymbol(String name) | abstract protected boolean | hasMoreElements(LocationEnumeration it) | public boolean | isBound(Symbol key, Object property) | final public boolean | isBound(Symbol key) | final public boolean | isLocked() True if this environment is locked - bindings cannot be added or removed. | final public Location | lookup(Symbol key, Object property) Return a location bound to (key, property).
Return null if no such Location exists. | abstract public NamedLocation | lookup(Symbol name, Object property, int hash) | final public Location | lookup(Symbol key) | public static SimpleEnvironment | make() | public static SimpleEnvironment | make(String name) | public static InheritingEnvironment | make(String name, Environment parent) | public void | put(Symbol key, Object property, Object newValue) | final public void | put(Symbol key, Object newValue) | final public Object | put(Object key, Object newValue) | final public Object | put(String key, Object value) | final public void | putFunction(Symbol key, Object newValue) | public Object | remove(Symbol key, Object property, int hash) Remove Location from this Environment and undefine it. | final public Object | remove(EnvironmentKey key) Remove and undefine binding. | final public Object | remove(Symbol symbol, Object property) | final public void | remove(Symbol sym) | final public Object | remove(Object key) | final public void | removeFunction(Symbol sym) | public void | setCanDefine(boolean canDefine) | public void | setCanRedefine(boolean canRedefine) | public static void | setCurrent(Environment env) | public void | setFlag(boolean setting, int flag) | public static void | setGlobal(Environment env) | final public void | setIndirectDefines() | public void | setLocked() | public String | toString() | public String | toStringVerbose() Overridden in sub-classes - useful for more verbose debug output. | public Location | unlink(Symbol key, Object property, int hash) Remove Location from this Environment. | public static Environment | user() |
CAN_DEFINE | final static int CAN_DEFINE(Code) | | |
CAN_IMPLICITLY_DEFINE | final static int CAN_IMPLICITLY_DEFINE(Code) | | If 'put' can implicitly define an unbound location.
|
CAN_REDEFINE | final static int CAN_REDEFINE(Code) | | |
DIRECT_INHERITED_ON_SET | final static int DIRECT_INHERITED_ON_SET(Code) | | If this flag is on, set DIRECT_ON_SET for inherited locations.
|
INDIRECT_DEFINES | final public static int INDIRECT_DEFINES(Code) | | Newly defined locations are created in inherited parent environment.
|
THREAD_SAFE | final static int THREAD_SAFE(Code) | | May be shared by multiple threads.
|
containsKey | final public boolean containsKey(Object key)(Code) | | |
getCanDefine | public boolean getCanDefine()(Code) | | True if new bindings (non-unbound Locations) can be added.
|
getCanRedefine | public boolean getCanRedefine()(Code) | | True if bindings can be removed or replaced by other kinds of Location.
|
getFlags | public int getFlags()(Code) | | |
getLocation | final public Location getLocation(Symbol key, Object property)(Code) | | Return a location bound to (key, property).
Create new unbound Location if no such Location exists.
|
getLocation | final public Location getLocation(Symbol key)(Code) | | Return a location bound to key (and null property).
Create new unbound Location if no such Location exists.
|
isLocked | final public boolean isLocked()(Code) | | True if this environment is locked - bindings cannot be added or removed.
|
lookup | final public Location lookup(Symbol key, Object property)(Code) | | Return a location bound to (key, property).
Return null if no such Location exists.
|
remove | public Object remove(Symbol key, Object property, int hash)(Code) | | Remove Location from this Environment and undefine it.
|
removeFunction | final public void removeFunction(Symbol sym)(Code) | | |
setCanDefine | public void setCanDefine(boolean canDefine)(Code) | | |
setCanRedefine | public void setCanRedefine(boolean canRedefine)(Code) | | |
setFlag | public void setFlag(boolean setting, int flag)(Code) | | |
setIndirectDefines | final public void setIndirectDefines()(Code) | | |
setLocked | public void setLocked()(Code) | | |
toStringVerbose | public String toStringVerbose()(Code) | | Overridden in sub-classes - useful for more verbose debug output.
|
unlink | public Location unlink(Symbol key, Object property, int hash)(Code) | | Remove Location from this Environment.
Does not explicitly undefine the location itself.
|
|
|