Module org.refcodes.observer
Package org.refcodes.observer
Class AbstractMetaDataActionEvent<A,EM extends EventMetaData,SRC>
java.lang.Object
org.refcodes.observer.AbstractEvent<SRC>
org.refcodes.observer.AbstractActionEvent<A,SRC>
org.refcodes.observer.AbstractMetaDataActionEvent<A,EM,SRC>
- Type Parameters:
A- The type of the action stored in the event.EM- The type of the EventMetaDataSRC- The type of the source in question.
- All Implemented Interfaces:
org.refcodes.mixin.ActionAccessor<A>,org.refcodes.mixin.MetaDataAccessor<EM>,org.refcodes.mixin.SourceAccessor<SRC>,ActionEvent<A,,SRC> Event<SRC>,MetaDataActionEvent<A,,EM, SRC> MetaDataEvent<EM,SRC>
public abstract class AbstractMetaDataActionEvent<A,EM extends EventMetaData,SRC>
extends AbstractActionEvent<A,SRC>
implements MetaDataActionEvent<A,EM,SRC>
The
AbstractMetaDataActionEvent provides a base implementation for an
MetaDataActionEvent.
In order to distinguish AbstractMetaDataActionEvent instances from
each other, you may create an actions enumeration, enumerating the various
event actions you support. Pass the actual action you intend to notify upon
to the according constructor, as an Observer you may use the
declarative method EventMatcherSugar.actionEqualWith(Object) to test
whether your action was notified (or a simple switch case statement).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor
org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends Object,B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A, B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends Object> Nested classes/interfaces inherited from interface org.refcodes.mixin.MetaDataAccessor
org.refcodes.mixin.MetaDataAccessor.MetaDataBuilder<MD extends Object,B extends org.refcodes.mixin.MetaDataAccessor.MetaDataBuilder<MD, B>>, org.refcodes.mixin.MetaDataAccessor.MetaDataMutator<MD extends Object>, org.refcodes.mixin.MetaDataAccessor.MetaDataProperty<MD extends Object> Nested classes/interfaces inherited from interface org.refcodes.mixin.SourceAccessor
org.refcodes.mixin.SourceAccessor.SourceBuilder<SRC extends Object,B extends org.refcodes.mixin.SourceAccessor.SourceBuilder<SRC, B>>, org.refcodes.mixin.SourceAccessor.SourceMutator<SRC extends Object>, org.refcodes.mixin.SourceAccessor.SourceProperty<SRC extends Object> -
Field Summary
FieldsFields inherited from class org.refcodes.observer.AbstractActionEvent
_action -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMetaDataActionEvent(A aAction, EM aEventMetaData, SRC aSource) Constructs an event with the given Meta-Data.AbstractMetaDataActionEvent(A aAction, SRC aSource) Constructs an event with the given Meta-Data.AbstractMetaDataActionEvent(EM aEventMetaData, SRC aSource) Constructs an event with the given Meta-Data.AbstractMetaDataActionEvent(SRC aSource) Constructs an event with the given Meta-Data. -
Method Summary
Methods inherited from class org.refcodes.observer.AbstractActionEvent
getActionMethods inherited from class org.refcodes.observer.AbstractEvent
getSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.refcodes.mixin.ActionAccessor
getActionMethods inherited from interface org.refcodes.mixin.SourceAccessor
getSource
-
Field Details
-
_eventMetaData
-
-
Constructor Details
-
AbstractMetaDataActionEvent
Constructs an event with the given Meta-Data.- Parameters:
aEventMetaData- The Meta-Data to by supplied by the event.aSource- The source from which this event originated.
-
AbstractMetaDataActionEvent
Constructs an event with the given Meta-Data.- Parameters:
aAction- The action which the event represents.aEventMetaData- The Meta-Data to by supplied by the event.aSource- The source from which this event originated.
-
AbstractMetaDataActionEvent
Constructs an event with the given Meta-Data.- Parameters:
aAction- The action which the event represents.aSource- The source from which this event originated.
-
AbstractMetaDataActionEvent
Constructs an event with the given Meta-Data.- Parameters:
aSource- The source from which this event originated.
-
-
Method Details