|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.util.CurrentInstance
public class CurrentInstance
Keeps track of various thread local instances used by the framework.
| Method Summary | ||
|---|---|---|
static void |
clearAll()
Clears all current instances. |
|
static
|
get(java.lang.Class<T> type)
Gets the current instance of a specific type if available. |
|
static
|
set(java.lang.Class<T> type,
T instance)
Sets the current instance of the given type. |
|
static
|
setInheritable(java.lang.Class<T> type,
T instance)
Sets the current inheritable instance of the given type. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T get(java.lang.Class<T> type)
type - the class to get an instance of
null
if there is no current instance.
public static <T> void set(java.lang.Class<T> type,
T instance)
type - the class that should be used when getting the current
instance backinstance - the actual instancesetInheritable(Class, Object),
ThreadLocal
public static <T> void setInheritable(java.lang.Class<T> type,
T instance)
type - the class that should be used when getting the current
instance backinstance - the actual instanceset(Class, Object),
InheritableThreadLocalpublic static void clearAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||