gnu.mapping
Class SimpleEnvironment
java.lang.Object
   gnu.mapping.Procedure
gnu.mapping.Procedure
       gnu.mapping.Procedure1
gnu.mapping.Procedure1
           gnu.mapping.NameMap
gnu.mapping.NameMap
               gnu.mapping.Environment
gnu.mapping.Environment
                   gnu.mapping.SimpleEnvironment
gnu.mapping.SimpleEnvironment
- All Implemented Interfaces: 
- HasSetter, Named
- Direct Known Subclasses: 
- InheritingEnvironment
- public class SimpleEnvironment 
- extends Environment
Concrete implementation of Environment.
 
 
 
| Method Summary | 
|  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)
 | 
|  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)
 | 
|  java.lang.Object | remove(EnvironmentKey key)Remove and undefine binding.
 | 
|  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)
 | 
 
| Methods inherited from class gnu.mapping.Environment | 
| addLocation, addLocation, containsKey, current, defaultNamespace, get, get, get, get, get, getCanDefine, getCanRedefine, 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, removeFunction, setCanDefine, setCanRedefine, setCurrent, setFlag, setGlobal, setIndirectDefines, setLocked, toString, user | 
 
 
 
| Methods inherited from class gnu.mapping.Procedure | 
| apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getName, getProperty, getSetter, getSymbol, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, removeProperty, set0, setN, setName, setProperty, setProperty, setSetter, setSymbol | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
 
SimpleEnvironment
public SimpleEnvironment()
SimpleEnvironment
public SimpleEnvironment(java.lang.String name)
SimpleEnvironment
public SimpleEnvironment(int capacity)
size
public int size()
- Size does not include inherited Locations.
 
- 
 
getCurrentLocation
public static Location getCurrentLocation(java.lang.String name)
- 
 
lookup_global
public static java.lang.Object lookup_global(Symbol name)
                                      throws UnboundLocationException
- 
- Throws:
- UnboundLocationException
 
lookup
public NamedLocation lookup(Symbol name,
                            java.lang.Object property,
                            int hash)
- 
- Specified by:
- lookupin class- Environment
 
- 
 
lookupDirect
public NamedLocation lookupDirect(Symbol name,
                                  java.lang.Object property,
                                  int hash)
- 
 
getLocation
public NamedLocation getLocation(Symbol name,
                                 java.lang.Object property,
                                 int hash,
                                 boolean create)
- 
- Specified by:
- getLocationin class- Environment
 
- 
 
addUnboundLocation
protected NamedLocation addUnboundLocation(Symbol name,
                                           java.lang.Object property,
                                           int hash)
- 
 
put
public void put(Symbol key,
                java.lang.Object property,
                java.lang.Object newValue)
- 
- Overrides:
- putin class- Environment
 
- 
 
define
public NamedLocation define(Symbol sym,
                            java.lang.Object property,
                            int hash,
                            java.lang.Object newValue)
- 
 
define
public void define(Symbol sym,
                   java.lang.Object property,
                   java.lang.Object newValue)
- 
- Specified by:
- definein class- Environment
 
- 
 
redefineError
protected void redefineError(Symbol name,
                             java.lang.Object property,
                             Location loc)
- 
 
addLocation
public NamedLocation addLocation(Symbol name,
                                 java.lang.Object property,
                                 Location loc)
- 
- Specified by:
- addLocationin class- Environment
 
- 
 
unlink
public Location unlink(Symbol symbol,
                       java.lang.Object property,
                       int hash)
- Description copied from class: Environment
- Remove Location from this Environment.
 Does not explicitly undefine the location itself.
 
- 
- Overrides:
- unlinkin class- Environment
 
- 
 
remove
public java.lang.Object remove(EnvironmentKey key)
- Description copied from class: Environment
- Remove and undefine binding.
 (A more type-specific version of gnu.util.mape.remove.)
 
- 
- Overrides:
- removein class- Environment
 
- 
- Returns:
- Old value
 
enumerateLocations
public LocationEnumeration enumerateLocations()
- Does not enumerate inherited Locations.
 
- 
- Specified by:
- enumerateLocationsin class- Environment
 
- 
 
enumerateAllLocations
public LocationEnumeration enumerateAllLocations()
- Does enumerate inherited Locations.
 
- 
- Specified by:
- enumerateAllLocationsin class- Environment
 
- 
 
hasMoreElements
protected boolean hasMoreElements(LocationEnumeration it)
- 
- Specified by:
- hasMoreElementsin class- Environment
 
- 
 
writeExternal
public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
- 
- Throws:
- java.io.IOException
 
readExternal
public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
- 
- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
readResolve
public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
- 
- Throws:
- java.io.ObjectStreamException
 
entrySet
public java.util.Set entrySet()
- 
 
toStringVerbose
public java.lang.String toStringVerbose()
- Description copied from class: Environment
- Overridden in sub-classes - useful for more verbose debug output.
 
- 
- Overrides:
- toStringVerbosein class- Environment
 
- 
 
toStringBase
protected void toStringBase(java.lang.StringBuffer sbuf)
-