Constructor and Description |
---|
LAFDelegate(Class<E> handler,
Class<E> defaultHandler) |
Modifier and Type | Method and Description |
---|---|
void |
changeHandler(E handler) |
E |
getHandler() |
HashSet<LAFChangeListener<E>> |
getListeners() |
void |
loadListeners(HashSet<LAFChangeListener<E>> listeners) |
E |
newHandlerInstance(String classname)
load a concrete Handler for a given Interface (by String classname) if the class is not instantiable, will fallback
to default, and then fallback to an abstract implementation.
|
E |
registerChangeListener(LAFChangeListener<E> listener) |
void |
unregisterChangeListener(LAFChangeListener<E> listener)
unregister a @see LAFChangeListener from the Map which will prevent notification on @see Handler change
|
public E newHandlerInstance(String classname) throws ClassNotFoundException
classname
- ClassNotFoundException
public E registerChangeListener(LAFChangeListener<E> listener)
public void unregisterChangeListener(LAFChangeListener<E> listener)
listener
- public HashSet<LAFChangeListener<E>> getListeners()
public void loadListeners(HashSet<LAFChangeListener<E>> listeners)
public void changeHandler(E handler)
public E getHandler()