gnu.mapping
Class IndirectableLocation

java.lang.Object
  extended by gnu.mapping.Location
      extended by gnu.mapping.IndirectableLocation
Direct Known Subclasses:
BufferLocal, NamedLocation

public abstract class IndirectableLocation
extends Location


Field Summary
protected  Location base
          If non-null, operations are forwarded to the base location.
protected static java.lang.Object DIRECT_ON_SET
          If value==DIRECT_ON_SET, break indirection on a set.
protected static java.lang.Object INDIRECT_FLUIDS
          If value has this value, force indirection even for the setWithSave operation.
protected  java.lang.Object value
          If base is null, the current value stored in this Location.
 
Fields inherited from class gnu.mapping.Location
UNBOUND
 
Constructor Summary
IndirectableLocation()
           
 
Method Summary
 Location getBase()
           
 Environment getEnvironment()
           
 java.lang.Object getKeyProperty()
           
 Symbol getKeySymbol()
           
 boolean isConstant()
           
 void setAlias(Location base)
          Define this Location as an alias for some other Location.
 void setBase(Location base)
           
 void undefine()
           
 
Methods inherited from class gnu.mapping.Location
entered, get, get, getValue, isBound, make, make, make, print, set, setRestore, setValue, setWithSave, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DIRECT_ON_SET

protected static final java.lang.Object DIRECT_ON_SET
If value==DIRECT_ON_SET, break indirection on a set.


INDIRECT_FLUIDS

protected static final java.lang.Object INDIRECT_FLUIDS
If value has this value, force indirection even for the setWithSave operation. Ignoring the restore aspect of a fluid-let, it is normally treated as closer to a define than to a set, in that we break the sharing with another Environment. Setting value to INDIRECT_FLUIDS means we do not want to break the indirection in this case.


base

protected Location base
If non-null, operations are forwarded to the base location.


value

protected java.lang.Object value
If base is null, the current value stored in this Location. If base is non-null, then value is generally ignored. However, the special value DIRECT_ON_SET means that writes change change value directly, instead of setting the value of base.

Constructor Detail

IndirectableLocation

public IndirectableLocation()
Method Detail

getKeySymbol

public Symbol getKeySymbol()
Overrides:
getKeySymbol in class Location

getKeyProperty

public java.lang.Object getKeyProperty()
Overrides:
getKeyProperty in class Location

isConstant

public boolean isConstant()
Overrides:
isConstant in class Location

getBase

public Location getBase()
Overrides:
getBase in class Location

setBase

public void setBase(Location base)

setAlias

public void setAlias(Location base)
Define this Location as an alias for some other Location.


undefine

public void undefine()
Overrides:
undefine in class Location

getEnvironment

public Environment getEnvironment()