public class ActionClassEventFilter extends java.lang.Object implements EventFilter
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<? extends Action> |
clazz |
Constructor and Description |
---|
ActionClassEventFilter(java.lang.Class<? extends Action> clazz)
Create a new action class filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
shouldSend(EventType event,
ExtensionPoint<?> extensionPoint,
Extension<?> extension)
Determine if the event should be sent to the event handler or not.
|
private final java.lang.Class<? extends Action> clazz
public ActionClassEventFilter(java.lang.Class<? extends Action> clazz)
ExtensionPoint.getActionClass()
is the same class or a subclass
to the class given in this constructor.clazz
- The classpublic boolean shouldSend(EventType event, ExtensionPoint<?> extensionPoint, Extension<?> extension)
EventFilter
shouldSend
in interface EventFilter
event
- The event that happendextensionPoint
- The extension point that the extension
extends, or that the event happened toextension
- The extension the event happend to, or null if the
event happended to the extension pointExtensionPoint.getActionClass()
is the
same class or a subclass of the class given in the constructor