Package gnu.expr
Class BuiltinEnvironment
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Environment
-
- gnu.expr.BuiltinEnvironment
-
- All Implemented Interfaces:
Named
public class BuiltinEnvironment extends Environment
An Environment containing the default bindings for the current Language. This is a singleton class. Alllookup
operations are indirected to the currentLanguage
.
-
-
Field Summary
-
Fields inherited from class gnu.mapping.Environment
curEnvironment, INDIRECT_DEFINES
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NamedLocation
addLocation(Symbol name, Object prop, Location loc)
void
define(Symbol key, Object property, Object newValue)
LocationEnumeration
enumerateAllLocations()
Does enumerate inherited Locations.LocationEnumeration
enumerateLocations()
Does not enumerate inherited Locations.static BuiltinEnvironment
getInstance()
Environment
getLangEnvironment()
NamedLocation
getLocation(Symbol key, Object property, int hash, boolean create)
protected boolean
hasMoreElements(LocationEnumeration it)
NamedLocation
lookup(Symbol name, Object property, int hash)
-
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, put, putFunction, remove, remove, remove, remove, remove, removeFunction, restoreCurrent, setCanDefine, setCanRedefine, setCurrent, setFlag, setGlobal, setIndirectDefines, setLocked, setSaveCurrent, toString, toStringVerbose, unlink, user
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Method Detail
-
getInstance
public static BuiltinEnvironment getInstance()
-
getLangEnvironment
public Environment getLangEnvironment()
-
lookup
public NamedLocation lookup(Symbol name, Object property, int hash)
- Specified by:
lookup
in classEnvironment
-
getLocation
public NamedLocation getLocation(Symbol key, Object property, int hash, boolean create)
- Specified by:
getLocation
in classEnvironment
-
define
public void define(Symbol key, Object property, Object newValue)
- Specified by:
define
in classEnvironment
-
enumerateLocations
public LocationEnumeration enumerateLocations()
Description copied from class:Environment
Does not enumerate inherited Locations.- Specified by:
enumerateLocations
in classEnvironment
-
enumerateAllLocations
public LocationEnumeration enumerateAllLocations()
Description copied from class:Environment
Does enumerate inherited Locations.- Specified by:
enumerateAllLocations
in classEnvironment
-
hasMoreElements
protected boolean hasMoreElements(LocationEnumeration it)
- Specified by:
hasMoreElements
in classEnvironment
-
addLocation
public NamedLocation addLocation(Symbol name, Object prop, Location loc)
- Specified by:
addLocation
in classEnvironment
-
-