public class Event<L extends Annotation> extends Object
Modifier and Type | Field and Description |
---|---|
protected Object[] |
args |
protected Object |
component |
protected Class<L> |
lifecycle |
Modifier | Constructor and Description |
---|---|
protected |
Event(Class<L> lifecycle)
Constructs a new
Event of the specified lifecycle. |
Modifier and Type | Method and Description |
---|---|
void |
fire()
Calls back the methods listening to the lifecycle on the specified
components.
|
static <L extends Annotation> |
of(Class<L> lifecycle)
Creates a new
Event of the specified lifecycle. |
Event<L> |
on(Object component)
Sets component on which this event fires.
|
Event<L> |
with(Object... args)
Sets event arguments.
|
protected final Class<L extends Annotation> lifecycle
protected Object[] args
protected Object component
public static <L extends Annotation> Event<L> of(Class<L> lifecycle)
Event
of the specified lifecycle.lifecycle
- Lifecycle this event fires.Event
instance.public Event<L> with(Object... args)
args
- The event arguments.Event
instance.public Event<L> on(Object component)
component
- The component on which this event fires.Event
instance.public final void fire()
Failed
event on the component.Copyright © 2011-2014 Eiichiro Uchiumi. All Rights Reserved.