Package gnu.mapping
Class InheritingEnvironment
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Environment
-
- gnu.mapping.SimpleEnvironment
-
- gnu.mapping.InheritingEnvironment
-
- All Implemented Interfaces:
Named
- Direct Known Subclasses:
AbstractScriptEngineFactory.BindingsEnvironment
public class InheritingEnvironment extends SimpleEnvironment
-
-
Field Summary
-
Fields inherited from class gnu.mapping.Environment
curEnvironment, INDIRECT_DEFINES
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description InheritingEnvironment(String name, Environment parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParent(Environment env)LocationEnumerationenumerateAllLocations()Does enumerate inherited Locations.NamedLocationgetLocation(Symbol name, Object property, int hash, boolean create)intgetNumParents()EnvironmentgetParent(int index)protected booleanhasMoreElements(LocationEnumeration it)NamedLocationlookup(Symbol name, Object property, int hash)NamedLocationlookupInherited(Symbol name, Object property, int hash)protected voidtoStringBase(StringBuffer sbuf)-
Methods inherited from class gnu.mapping.SimpleEnvironment
addLocation, addUnboundLocation, define, define, entrySet, enumerateLocations, getCurrentLocation, lookup_global, lookupDirect, newLocation, put, readExternal, readResolve, redefineError, size, toStringVerbose, unlink, writeExternal
-
Methods inherited from class gnu.mapping.Environment
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
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Constructor Detail
-
InheritingEnvironment
public InheritingEnvironment(String name, Environment parent)
-
-
Method Detail
-
getNumParents
public final int getNumParents()
-
getParent
public final Environment getParent(int index)
-
addParent
public void addParent(Environment env)
-
lookupInherited
public NamedLocation lookupInherited(Symbol name, Object property, int hash)
-
lookup
public NamedLocation lookup(Symbol name, Object property, int hash)
- Overrides:
lookupin classSimpleEnvironment
-
getLocation
public NamedLocation getLocation(Symbol name, Object property, int hash, boolean create)
- Overrides:
getLocationin classSimpleEnvironment
-
enumerateAllLocations
public LocationEnumeration enumerateAllLocations()
Description copied from class:SimpleEnvironmentDoes enumerate inherited Locations.- Overrides:
enumerateAllLocationsin classSimpleEnvironment
-
hasMoreElements
protected boolean hasMoreElements(LocationEnumeration it)
- Overrides:
hasMoreElementsin classSimpleEnvironment
-
toStringBase
protected void toStringBase(StringBuffer sbuf)
- Overrides:
toStringBasein classSimpleEnvironment
-
-