com.hammurapi.eventbus
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>>

Show UML class diagram
java.lang.Object
  extended by com.hammurapi.eventbus.IntrospectorBase<E,C>
      extended by com.hammurapi.eventbus.ReflectiveEventHandlerFactory<E,C,H,S>
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.hammurapi.eventbus.IntrospectorBase
IntrospectorBase.IntrospectionResult<E,C>
 
Constructor Summary
Introspector(ClassLoader classLoader, TokenExpander tokenExpander)
           
 
Method Summary
 Set<K> bind(C instance, B bus)
          Registers instance methods annotated with Handler annotation with the bus.
 
Methods inherited from class com.hammurapi.eventbus.ReflectiveEventHandlerFactory
createHandlers
 
Methods inherited from class com.hammurapi.eventbus.IntrospectorBase
introspect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Introspector

public Introspector(ClassLoader classLoader,
                    TokenExpander tokenExpander)
Method Detail

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.