public class DefaultJAXXContext extends Object implements JAXXContext
JAXXContext to be used in a JAXXObject by
delegation.
The values are store in a Map but we can not use directly the values
as key.
Because, it does not work if we add for the same object multi entries (named
and unamed)...
We prefer use as entry the JAXXContextEntryDef associated with the
value.| Modifier and Type | Field and Description |
|---|---|
protected Map<JAXXContextEntryDef<?>,Object> |
data
les données contenues dans le context
|
protected static JAXXContextEntryDef<JAXXContext> |
PARENT_CONTEXT_ENTRY
entry of the parent context
|
protected JAXXContext |
parentContext
le context parent
|
| Constructor and Description |
|---|
DefaultJAXXContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
<T> T |
getContextValue(Class<T> clazz) |
<T> T |
getContextValue(Class<T> clazz,
String name) |
protected JAXXContextEntryDef<?> |
getEntry(Class<?> klass,
String name) |
protected JAXXContextEntryDef<?> |
getKey(String name,
Class<?> klass) |
String[] |
getKeys(Class<?> klass)
Obtain all the keys of data for a given type.
|
protected JAXXContext |
getParentContext() |
protected <T> T |
remove0(Class<T> klass,
String name) |
<T> void |
removeContextValue(Class<T> klazz) |
<T> void |
removeContextValue(Class<T> klazz,
String name) |
<T> void |
setContextValue(T o) |
<T> void |
setContextValue(T o,
String name) |
protected void |
setParentContext(JAXXContext parentContext) |
protected static final JAXXContextEntryDef<JAXXContext> PARENT_CONTEXT_ENTRY
protected JAXXContext parentContext
protected final Map<JAXXContextEntryDef<?>,Object> data
public <T> void setContextValue(T o)
setContextValue in interface JAXXContextpublic <T> void setContextValue(T o,
String name)
setContextValue in interface JAXXContextpublic <T> T getContextValue(Class<T> clazz)
getContextValue in interface JAXXContextpublic <T> T getContextValue(Class<T> clazz, String name)
getContextValue in interface JAXXContextpublic <T> void removeContextValue(Class<T> klazz)
removeContextValue in interface JAXXContextpublic <T> void removeContextValue(Class<T> klazz, String name)
removeContextValue in interface JAXXContextpublic String[] getKeys(Class<?> klass)
klass - the type of searched keyspublic void clear()
protected JAXXContextEntryDef<?> getKey(String name, Class<?> klass)
protected JAXXContextEntryDef<?> getEntry(Class<?> klass, String name)
protected JAXXContext getParentContext()
protected void setParentContext(JAXXContext parentContext)
Copyright © 2008–2017 Ultreia.io. All rights reserved.