java.lang.Object
com.hammurapi.eventbus.IntrospectorBase<E,C>
com.hammurapi.eventbus.ReflectiveEventHandlerFactory<E,C,H,S>
com.hammurapi.eventbus.Introspector<E,C,K,H,S,B>
- Type Parameters:
E - Event type.P - Priority type.C - Context type.K - Registration key type.
- All Implemented Interfaces:
- JavaBinder<E,C,K,H,S,B,C>
- Direct Known Subclasses:
- LocalIntrospector
public class Introspector<E,C,K,H extends EventBus.Handle<E,Integer,C>,S extends EventStore<E,Integer,C,H,S>,B extends EventBus<E,Integer,C,K,H,S>>
- extends ReflectiveEventHandlerFactory<E,C,H,S>
- implements JavaBinder<E,C,K,H,S,B,C>
This class introspects instances passed to it and creates event handlers from
classes annotated with Handler annotation.
|
Method Summary |
Set<K> |
bind(C instance,
B bus)
Registers instance methods annotated with Handler annotation with the bus. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Introspector
public Introspector(ClassLoader classLoader,
TokenExpander tokenExpander)
bind
public Set<K> bind(C instance,
B bus)
- Registers instance methods annotated with Handler annotation with the bus.
- Specified by:
bind in interface JavaBinder<E,C,K,H extends EventBus.Handle<E,Integer,C>,S extends EventStore<E,Integer,C,H,S>,B extends EventBus<E,Integer,C,K,H,S>,C>
- Parameters:
instance - Instance with handler methods.bus - Event bus.
- Returns:
- Set of registration keys.