Package gnu.mapping
Class IndirectableLocation<T>
- java.lang.Object
-
- gnu.mapping.Location<T>
-
- gnu.mapping.IndirectableLocation<T>
-
- Direct Known Subclasses:
NamedLocation
public abstract class IndirectableLocation<T> extends Location<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected Location<T>baseIf non-null, operations are forwarded to the base location.protected static ObjectDIRECT_ON_SETIfvalue==DIRECT_ON_SET, break indirection on aset.protected static ObjectINDIRECT_FLUIDSIfvaluehas this value, force indirection even for thesetWithSaveoperation.protected ObjectvalueIfbaseis null, the current value stored in thisLocation.
-
Constructor Summary
Constructors Constructor Description IndirectableLocation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocationgetBase()LocationgetBaseForce()EnvironmentgetEnvironment()ObjectgetKeyProperty()SymbolgetKeySymbol()booleanisConstant()voidsetAlias(Location base)Define this Location as an alias for some other Location.voidsetBase(Location base)voidundefine()
-
-
-
Field Detail
-
DIRECT_ON_SET
protected static final Object DIRECT_ON_SET
Ifvalue==DIRECT_ON_SET, break indirection on aset.
-
INDIRECT_FLUIDS
protected static final Object INDIRECT_FLUIDS
Ifvaluehas this value, force indirection even for thesetWithSaveoperation. Ignoring the restore aspect of afluid-let, it is normally treated as closer to adefinethan to aset, in that we break the sharing with anotherEnvironment. SettingvaluetoINDIRECT_FLUIDSmeans we do not want to break the indirection in this case.
-
value
protected Object value
Ifbaseis null, the current value stored in thisLocation. Ifbaseis non-null, thenvalueis generally ignored. However, the special valueDIRECT_ON_SETmeans that writes changevaluedirectly, instead of setting the value ofbase.
-
-
Method Detail
-
getKeySymbol
public Symbol getKeySymbol()
- Overrides:
getKeySymbolin classLocation<T>
-
getKeyProperty
public Object getKeyProperty()
- Overrides:
getKeyPropertyin classLocation<T>
-
isConstant
public boolean isConstant()
- Overrides:
isConstantin classLocation<T>
-
getBaseForce
public Location getBaseForce()
-
setBase
public void setBase(Location base)
-
setAlias
public void setAlias(Location base)
Define this Location as an alias for some other Location.
-
getEnvironment
public Environment getEnvironment()
-
-