|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator
public class AnnotationListenerRegistrator
The registrator that is driven by annotations on the class it introspects.
WARNING: the inheritance does not work here! Only the top class object is introspected.
Constructor Summary | |
---|---|
AnnotationListenerRegistrator(java.lang.Object obj,
IWorldView worldView,
java.util.logging.Logger log)
|
Method Summary | |
---|---|
void |
addListeners()
Introspect all object's methods and register various listeners based on EventListener , etc... |
static WorldObjectId |
getId(java.lang.reflect.Method method,
ObjectEventListener annotation)
Returns a new WorldObjectId for the given 'annotation'. |
static WorldObjectId |
getId(java.lang.reflect.Method method,
ObjectListener annotation)
Returns a new WorldObjectId for the given 'annotation'. |
static ListenerLevel |
getListenerLevel(java.lang.reflect.Method method)
Returns listener level that is gained from the method's annotation. |
int |
getListenersCount()
|
void |
removeListeners()
Removes (unregister) all the listeners the registrator has created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationListenerRegistrator(java.lang.Object obj, IWorldView worldView, java.util.logging.Logger log)
Method Detail |
---|
public static WorldObjectId getId(java.lang.reflect.Method method, ObjectListener annotation)
WorldObjectId
for the given 'annotation'.
method
- annotation
-
public static WorldObjectId getId(java.lang.reflect.Method method, ObjectEventListener annotation)
WorldObjectId
for the given 'annotation'.
method
- annotation
-
public static ListenerLevel getListenerLevel(java.lang.reflect.Method method)
method
-
public void addListeners() throws ListenersAlreadyRegisteredException
EventListener
, etc... annotations.
addListeners
in interface IListenerRegistrator
obj
-
ListenersAlreadyRegisteredException
public int getListenersCount()
public void removeListeners()
IListenerRegistrator
removeListeners
in interface IListenerRegistrator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |