public class ThreadLocation extends NamedLocation implements Named
Modifier and Type | Class and Description |
---|---|
class |
ThreadLocation.InheritingLocation |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANONYMOUS
Magic property value used for the "anonymous" ThreadLocations.
|
base, DIRECT_ON_SET, INDIRECT_FLUIDS, value
FUNCTION
Constructor and Description |
---|
ThreadLocation()
A new anonymous fluid location.
|
ThreadLocation(java.lang.String name)
A new anonymous fluid location but used a given name for printing.
|
ThreadLocation(Symbol name,
java.lang.Object property,
SharedLocation global) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object defaultValue) |
static ThreadLocation |
getInstance(Symbol name,
java.lang.Object property)
For a given (Symbol.
|
NamedLocation |
getLocation()
Get the thread-specific Location for this Location.
|
java.lang.String |
getName() |
java.lang.Object |
getSymbol() |
static ThreadLocation |
makeAnonymous(java.lang.String name)
Create a fresh ThreadLocation, independent of other ThreadLocations.
|
static ThreadLocation |
makeAnonymous(Symbol name)
Create a fresh ThreadLocation, independent of other ThreadLocations.
|
void |
set(java.lang.Object value) |
void |
setGlobal(java.lang.Object value)
Set the default/global value.
|
void |
setName(java.lang.String name) |
void |
setRestore(java.lang.Object oldValue)
Restore an old value.
|
java.lang.Object |
setWithSave(java.lang.Object newValue)
Set a value, but return cookie so old value can be restored.
|
entered, equals, getEnvironment, getKey, getKeyProperty, getKeySymbol, hashCode, matches, matches
getBase, getBaseForce, isConstant, setAlias, setBase, undefine
get, getValue, isBound, make, make, make, print, setValue, toString
public static final java.lang.String ANONYMOUS
public ThreadLocation()
public ThreadLocation(java.lang.String name)
public ThreadLocation(Symbol name, java.lang.Object property, SharedLocation global)
public static ThreadLocation makeAnonymous(java.lang.String name)
name
- used for printing, but not identification.public static ThreadLocation makeAnonymous(Symbol name)
name
- used for printing, but not identification.public void setGlobal(java.lang.Object value)
public NamedLocation getLocation()
public java.lang.Object setWithSave(java.lang.Object newValue)
Location
setWithSave
in class NamedLocation
public void setRestore(java.lang.Object oldValue)
Location
setRestore
in class NamedLocation
oldValue
- the return value from a prior setWithSave.public static ThreadLocation getInstance(Symbol name, java.lang.Object property)