|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.context.DefaultJAXXContext
public class DefaultJAXXContext
The default JAXXContext to be used in a JAXXObject by delegation.
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.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
DefaultJAXXContext()
|
|
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
|
getContextValue(Class<T> clazz)
Seek for a unamed entry in the context This is an exemple to call a method in JAXX : <JButton onActionPerformed='{getContextValue(Action.class).method(args[])}'/> |
|
|
getContextValue(Class<T> clazz,
String name)
Seek for a named entry in the context |
|
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
|
remove0(Class<T> klazz,
String name)
|
|
|
removeContextValue(Class<T> klazz)
Remove from context the value with the given klazz as an unamed entry |
|
|
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 |
|
|
setContextValue(T o)
Push in the context a new unamed entry. |
|
|
setContextValue(T o,
String name)
* Push in the context a new amed entry. |
|
protected void |
setParentContext(JAXXContext parentContext)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final JAXXContextEntryDef<JAXXContext> PARENT_CONTEXT_ENTRY
protected JAXXContext parentContext
protected final Map<JAXXContextEntryDef<?>,Object> data
| Constructor Detail |
|---|
public DefaultJAXXContext()
| Method Detail |
|---|
public <T> void setContextValue(T o)
JAXXContext
setContextValue in interface JAXXContextT - type of data to set in contexto - the value to push in context
public <T> void setContextValue(T o,
String name)
JAXXContext
setContextValue in interface JAXXContextT - type of data to set in contexto - the value to push in contextname - the name of the new entrypublic <T> T getContextValue(Class<T> clazz)
JAXXContext<JButton onActionPerformed='{getContextValue(Action.class).method(args[])}'/>
getContextValue in interface JAXXContextT - type of data to obtain from contextclazz - the class of unamed entry to seek in context
null if no such entry.
public <T> T getContextValue(Class<T> clazz,
String name)
JAXXContext
getContextValue in interface JAXXContextT - type of data to obtain from contextclazz - the class of named entry to seek in contextname - the name of the entry to seek in context
null if no such entry.public <T> void removeContextValue(Class<T> klazz)
JAXXContext
removeContextValue in interface JAXXContextT - type of data to remove from contextklazz - the klazz entry
public <T> void removeContextValue(Class<T> klazz,
String name)
JAXXContext
removeContextValue in interface JAXXContextT - type of data to remove from contextklazz - the klazz entryname - extra name of the entrypublic String[] getKeys(Class<?> klass)
klass - the type of searched keys
public void clear()
protected JAXXContextEntryDef<?> getKey(String name,
Class<?> klass)
protected <T> T remove0(Class<T> klazz,
String name)
protected JAXXContext getParentContext()
protected void setParentContext(JAXXContext parentContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||