public class JAXXInitialContext extends DefaultJAXXContext
JAXXObject.
The method add(Object) register a simple value.
The method add(String, Object) register a named value.
The method to(JAXXContext) inject in the JAXXObject the values registred in the initial context.
The initial context is also a "limited" JAXXContext, since we can only use the two methods
DefaultJAXXContext.getContextValue(Class) or DefaultJAXXContext.getContextValue(Class, String).JAXXContextdata, PARENT_CONTEXT_ENTRY, parentContext| Constructor and Description |
|---|
JAXXInitialContext() |
| Modifier and Type | Method and Description |
|---|---|
<O> JAXXInitialContext |
add(JAXXContextEntryDef<O> def,
O value)
Register a named (or not) value in the context.
|
JAXXInitialContext |
add(Object value)
Register a simple (none named) value in the context.
|
JAXXInitialContext |
add(String name,
Object value)
Register a named value in the context.
|
<T> void |
removeContextValue(Class<T> klazz)
Remove from context the value with the given klazz as an unamed entry
|
<T> void |
removeContextValue(Class<T> klazz,
String name)
Remove from context the value with the given klazz as an unamed (if name is null) or named entry
|
void |
setContextValue(Object o)
Push in the context a new unamed entry.
|
void |
setContextValue(Object o,
String name)
* Push in the context a new amed entry.
|
void |
to(JAXXContext dst)
Inject all the registed values into the
JAXXObject |
clear, getContextValue, getContextValue, getEntry, getKey, getKeys, getParentContext, remove0, setParentContextpublic JAXXInitialContext add(Object value)
value - the value to be registred in the contextpublic JAXXInitialContext add(String name, Object value)
name - the name of the valuevalue - the value to registredpublic <O> JAXXInitialContext add(JAXXContextEntryDef<O> def, O value)
O - type of data to adddef - definition of entryvalue - the value to registredpublic void to(JAXXContext dst)
JAXXObjectdst - the object to fill.public void setContextValue(Object o)
JAXXContextsetContextValue in interface JAXXContextsetContextValue in class DefaultJAXXContexto - the value to push in contextpublic void setContextValue(Object o, String name)
JAXXContextsetContextValue in interface JAXXContextsetContextValue in class DefaultJAXXContexto - the value to push in contextname - the name of the new entrypublic <T> void removeContextValue(Class<T> klazz)
JAXXContextremoveContextValue in interface JAXXContextremoveContextValue in class DefaultJAXXContextT - type of data to remove from contextklazz - the klazz entrypublic <T> void removeContextValue(Class<T> klazz, String name)
JAXXContextremoveContextValue in interface JAXXContextremoveContextValue in class DefaultJAXXContextT - type of data to remove from contextklazz - the klazz entryname - extra name of the entryCopyright © 2008–2016 CodeLutin. All rights reserved.