org.picocontainer.defaults
Class ThreadLocalReference
java.lang.Object
org.picocontainer.defaults.ThreadLocalReference
- All Implemented Interfaces:
- ObjectReference
- public class ThreadLocalReference
- extends Object
- implements ObjectReference
Implementation of an ObjectReference
as ThreadLocal
.
- Author:
- Jörg Schaible
Method Summary |
Object |
get()
Retrieve an actual reference to the object. |
void |
set(Object item)
Assign an object to the reference. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadLocalReference
public ThreadLocalReference()
get
public Object 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 interface ObjectReference
- Returns:
- an actual reference to the object.
- See Also:
ObjectReference.get()
set
public void set(Object item)
- Description copied from interface:
ObjectReference
- Assign an object to the reference.
- Specified by:
set
in interface ObjectReference
- Parameters:
item
- the object to assign to the reference. May be null
.- See Also:
ObjectReference.set(java.lang.Object)
Copyright © 2003-2004 Codehaus. All Rights Reserved.