gnu.mapping

Class ThreadLocation

public class ThreadLocation extends Location implements Named

A Location that forwards to a thread-specific Location.
Field Summary
static StringANONYMOUS
Magic property value used for the "anonymous" ThreadLocations.
Constructor Summary
ThreadLocation()
A new anonymous fluid location.
ThreadLocation(String name)
A new anonymous fluid location but used a given name for printing.
ThreadLocation(Symbol name, Object property, Location global)
Method Summary
Objectget(Object defaultValue)
static ThreadLocationgetInstance(Symbol name, Object property)
For a given (Symbol. property)-pair, find or create a matching ThreadLocation.
ObjectgetKeyProperty()
SymbolgetKeySymbol()
LocationgetLocation()
Get the thread-specific Location for this Location.
StringgetName()
ObjectgetSymbol()
static ThreadLocationmakePrivate(String name)
Create a fresh ThreadLocation, independent of other ThreaDLocations.
static ThreadLocationmakePrivate(Symbol name)
voidset(Object value)
voidsetGlobal(Object value)
Set the default/global value.
voidsetName(String name)
voidsetRestore(Object oldValue, CallContext ctx)
ObjectsetWithSave(Object newValue, CallContext ctx)

Field Detail

ANONYMOUS

public static final String ANONYMOUS
Magic property value used for the "anonymous" ThreadLocations. These are thread-specific dynamic "parameters" (in the SRFI-39 sense) that are not tied to a specfic name.

Constructor Detail

ThreadLocation

public ThreadLocation()
A new anonymous fluid location.

ThreadLocation

public ThreadLocation(String name)
A new anonymous fluid location but used a given name for printing. However, the binding is not bound to the name as a visible binding.

ThreadLocation

public ThreadLocation(Symbol name, Object property, Location global)

Method Detail

get

public Object get(Object defaultValue)

getInstance

public static ThreadLocation getInstance(Symbol name, Object property)
For a given (Symbol. property)-pair, find or create a matching ThreadLocation.

getKeyProperty

public Object getKeyProperty()

getKeySymbol

public Symbol getKeySymbol()

getLocation

public Location getLocation()
Get the thread-specific Location for this Location.

getName

public String getName()

getSymbol

public Object getSymbol()

makePrivate

public static ThreadLocation makePrivate(String name)
Create a fresh ThreadLocation, independent of other ThreaDLocations. Creates new unique EnvironmentKey, using a unique property key.

Parameters: name used for printing, but not identification.

makePrivate

public static ThreadLocation makePrivate(Symbol name)

set

public void set(Object value)

setGlobal

public void setGlobal(Object value)
Set the default/global value.

setName

public void setName(String name)

setRestore

public void setRestore(Object oldValue, CallContext ctx)

setWithSave

public Object setWithSave(Object newValue, CallContext ctx)