|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.ClassLoaderLocal<T>
public class ClassLoaderLocal<T>
This class provides classloader-local variables.
It is designed to look very much like ThreadLocal.
| Constructor Summary | |
|---|---|
ClassLoaderLocal()
|
|
| Method Summary | |
|---|---|
T |
get()
Returns the value in the current classloader copy of this variable. |
protected T |
initialValue()
Returns the current classloader "initial value" for this classloader-local variable. |
void |
remove()
Removes the current classloader's value for this variable. |
void |
set(T value)
Sets the current classloaders's copy of this variable to the specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassLoaderLocal()
| Method Detail |
|---|
protected T initialValue()
This implementation simply returns null; if the programmer desires classloader-local variables to have an initial value other than null, ClassLoaderLocal must be subclassed, and this method overridden. Typically, an anonymous inner class will be used.
public T get()
public void set(T value)
public void remove()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||