AnnotationEventListenerResolver

Inspects an object for annotated methods of interest and creates an {@link EventListener} instance for each method discovered. An event bus will call the resulting listeners as relevant events arrive. <p/> The default {@link #setAnnotationClass(Class) annotationClass} is {@link Subscribe}, indicating each {@link Subscribe}-annotated method will be represented as an EventListener.

@see SingleArgumentMethodEventListener @since 1.3

Constructors

this
this()
Undocumented in source.

Members

Functions

getAnnotationClass
TypeInfo_Class getAnnotationClass()

Returns the type of annotation that indicates a method that should be represented as an {@link EventListener}, defaults to {@link Subscribe}.

getEventListeners
EventListener[] getEventListeners(Object instance)

Returns a new collection of {@link EventListener} instances, each instance corresponding to an annotated method discovered on the specified {@code instance} argument.

setAnnotationClass
void setAnnotationClass(TypeInfo_Class annotationClass)

Sets the type of annotation that indicates a method that should be represented as an {@link EventListener}. The default value is {@link Subscribe}.

Inherited Members

From EventListenerResolver

getEventListeners
EventListener[] getEventListeners(Object instance)

Returns {@link EventListener} instances as a result of inspecting a subscriber object, mostly likely with {@link hunt.shiro.event.Subscribe Subscribe}-annotated methods.

Meta