public class ClassLoaderLocal<T>
extends java.lang.Object
It is designed to look very much like ThreadLocal
.
Constructor and Description |
---|
ClassLoaderLocal() |
Modifier and Type | Method and Description |
---|---|
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.
|
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()
Copyright © 2003-present Jodd Team