Inherits org.qscript.eventsonfire.EventHandlerInfo.
Inherited by org.qscript.eventsonfire.EventHandlerAnnotationInfo, org.qscript.eventsonfire.PooledEventHandlerAnnotationInfo, and org.qscript.eventsonfire.SwingEventHandlerAnnotationInfo.
|
abstract void | call (Object producer, Object consumer, Object event, String...tags) |
|
boolean | isCallable (final Class<?> producerType, final Class<?> eventType, String...tags) |
|
boolean | isProducerAssignable (final Class<?> type) |
|
boolean | isEventAssignable (final Class<?> type) |
|
boolean | isTagsMatching (String[] tags) |
|
boolean | isAnyTagsMatching (String[] tags) |
|
boolean | isEachTagsMatching (String[] tags) |
|
|
static void | validateAssignableProvider (Method method, Class<?> parameterType, Class<?>[] producerTypesByAnnotation) |
|
static void | validateAssignableEvent (Method method, Class<?> parameterType, Class<?>[] eventTypesByAnnotation) |
|
static void | validateTagsOfString (Method method, Class<?> parameterType) |
|
static void | validateEventTypeByAnnotationNotEmpty (Method method, Class<?>[] eventTypesByAnnotation) |
|
static void | validateReturnType (Method method) |
|
static< TYPE > TYPE[] | toArray (TYPE fallback, TYPE...values) |
|
static< TYPE > Set< TYPE > | toSet (TYPE fallback, TYPE...values) |
|
|
final MethodType | methodType |
|
final Method | method |
|
final Class<?>[] | producerTypes |
|
final Class<?>[] | eventTypes |
|
final Set< String > | anyTags |
|
final Set< String > | eachTags |
|
Abstract implementation of an EventHandlerInfo based on a method with possible and allowed producer and event types.
- Author
- Manfred HANTSCHEL
abstract void org.qscript.eventsonfire.AbstractEventHandlerInfo.call |
( |
Object |
producer, |
|
|
Object |
consumer, |
|
|
Object |
event, |
|
|
String... |
tags |
|
) |
| |
|
protectedpure virtual |
If the event handler is invokable, this method calls it
- Parameters
-
producer | the producer |
consumer | the consumer |
event | the event |
tags | the tags |
Set<String> org.qscript.eventsonfire.AbstractEventHandlerInfo.getAnyTags |
( |
| ) |
|
Returns the any tags
- Returns
- the any tags
Set<String> org.qscript.eventsonfire.AbstractEventHandlerInfo.getEachTags |
( |
| ) |
|
Returns the each tags
- Returns
- the each tags
Class<?> [] org.qscript.eventsonfire.AbstractEventHandlerInfo.getEventTypes |
( |
| ) |
|
Returns all allowed event types
- Returns
- an array of event types
Method org.qscript.eventsonfire.AbstractEventHandlerInfo.getMethod |
( |
| ) |
|
Returns the method
- Returns
- the method
MethodType org.qscript.eventsonfire.AbstractEventHandlerInfo.getMethodType |
( |
| ) |
|
Returns the method type
- Returns
- the method type
Class<?> [] org.qscript.eventsonfire.AbstractEventHandlerInfo.getProducerTypes |
( |
| ) |
|
Returns all allowed producer types
- Returns
- an array of producer types
boolean org.qscript.eventsonfire.AbstractEventHandlerInfo.invoke |
( |
Object |
producer, |
|
|
Object |
consumer, |
|
|
Object |
event, |
|
|
String... |
tags |
|
) |
| |
Invokes the method referenced by this information object if applicable for the type of producer, consumer and event. If an error occurs when invoking the method, the invocationFailed method of the ErrorHandler is called.
- Parameters
-
producer | the producer, mandatory |
consumer | the consumer, mandatory |
event | the event, mandatory |
tags | the tags |
- Returns
- true if invoked (or will be invoked in near future), false otherwise
Implements org.qscript.eventsonfire.EventHandlerInfo.
boolean org.qscript.eventsonfire.AbstractEventHandlerInfo.isCallable |
( |
final Class<?> |
producerType, |
|
|
final Class<?> |
eventType, |
|
|
String... |
tags |
|
) |
| |
|
protected |
Returns true if the event handler is callable
- Parameters
-
producerType | the type of the producer |
eventType | the type of the event |
tags | some tags |
- Returns
- true if invokable
boolean org.qscript.eventsonfire.AbstractEventHandlerInfo.isEventAssignable |
( |
final Class<?> |
type | ) |
|
|
protected |
Returns true if the event is permitted by the annotation and the parameter
- Parameters
-
type | the type of the event |
- Returns
- true if permitted
boolean org.qscript.eventsonfire.AbstractEventHandlerInfo.isProducerAssignable |
( |
final Class<?> |
type | ) |
|
|
protected |
Returns true if the producer is permitted by the annotation and the parameter
- Parameters
-
type | the type of the producer |
- Returns
- true if permitted
The documentation for this class was generated from the following file:
- /Users/peter/git/qscript-repos/Q-script/src/org/qscript/eventsonfire/AbstractEventHandlerInfo.java