public class DefaultApplicationContext extends DefaultJAXXContext
DefaultJAXXContext and add a possibility to
auto-instanciate some classes asked via DefaultJAXXContext.getContextValue(Class) and
getContextValue(Class, String) methods.
To registred a such class, just annotate your class with DefaultApplicationContext.AutoLoad.DefaultJAXXContext| Modifier and Type | Class and Description |
|---|---|
static interface |
DefaultApplicationContext.AutoLoad
A class annotated @AutoLoad is used by context to auto instanciate
the class when required.
|
static interface |
DefaultApplicationContext.MethodAccess
A class annotated @MethodAccess is used by context to obtain the
value of an entry via a declared method.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<JAXXContextEntryDef<?>,String> |
entryListened
Map of entries to watch associated with the property to fires if a
modification was found.
|
protected Map<Class<?>,Class<?>> |
forwards
Map of forwarded classes (key) to classes (values).
|
protected PropertyChangeSupport |
pcs
to manage properties modifications
|
data, PARENT_CONTEXT_ENTRY, parentContext| Constructor and Description |
|---|
DefaultApplicationContext() |
clear, getContextValue, getEntry, getKey, getKeys, getParentContext, remove0, removeContextValue, setContextValue, setParentContextprotected final Map<Class<?>,Class<?>> forwards
protected Map<JAXXContextEntryDef<?>,String> entryListened
protected final PropertyChangeSupport pcs
public <T> T getContextValue(Class<T> clazz, String name)
getContextValue in interface JAXXContextgetContextValue in class DefaultJAXXContextpublic <T> void removeContextValue(Class<T> klass, String name)
removeContextValue in interface JAXXContextremoveContextValue in class DefaultJAXXContextpublic <T> void setContextValue(T o,
String name)
setContextValue in interface JAXXContextsetContextValue in class DefaultJAXXContextpublic void addPropertyChangeListener(JAXXContextEntryDef<?> entry, String name, PropertyChangeListener listener)
entry - the entry to listenname - the property name to fire if necessarylistener - the listener to notify if entry has changedpublic void removePropertyChangeListener(JAXXContextEntryDef<?> entry, String name, PropertyChangeListener listener)
entry - the entry to listenname - the property name to fire if necessarylistener - the listener to notify if entry has changedpublic void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
public boolean hasListeners(String propertyName)
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
public PropertyChangeListener[] getPropertyChangeListeners()
protected void fireEntryChanged(Class<?> klass, String name, Object oldValue, Object newValue)
protected void fireEntryChanged(JAXXContextEntryDef<?> entryDef, Object oldValue, Object newValue)
protected Object newInstance(Class<?> clazz) throws IllegalArgumentException
IllegalArgumentExceptionprotected Object newAccess(Class<?> clazz, Object parent, String methodName, String name) throws IllegalArgumentException
IllegalArgumentExceptionprotected Object newAccess(Class<?> clazz, Object parent, String methodName) throws IllegalArgumentException
IllegalArgumentExceptionCopyright © 2008–2018 Ultreia.io. All rights reserved.