Package org.picocontainer.references
Class ThreadLocalMapObjectReference<T>
java.lang.Object
org.picocontainer.references.ThreadLocalMapObjectReference<T>
- All Implemented Interfaces:
ObjectReference<T>
Gets and sets references on a map stored in Thread Local
- Author:
- Paul Hammant
-
Constructor Summary
ConstructorsConstructorDescriptionThreadLocalMapObjectReference
(ThreadLocal<Map<Object, T>> threadLocal, Object componentKey) -
Method Summary
-
Constructor Details
-
ThreadLocalMapObjectReference
-
-
Method Details
-
get
Description copied from interface:ObjectReference
Retrieve an actual reference to the object. Returns null if the reference is not available or has not been populated yet.- Specified by:
get
in interfaceObjectReference<T>
- Returns:
- an actual reference to the object.
-
set
Description copied from interface:ObjectReference
Assign an object to the reference.- Specified by:
set
in interfaceObjectReference<T>
- Parameters:
item
- the object to assign to the reference. May benull
.
-