Event.
Event types form a hierarchy with the EventType#ROOT (equals to
Event#ANY) as its root. This is useful in event filter / handler
registration where a single event filter / handler can be registered to a
super event type and will be receiving its sub type events as well.
Note that you cannot construct two different EventType objects with the same
name and parent.
Note about deserialization: All EventTypes that are going to be deserialized
(e.g. as part of Event deserialization), need to exist at the time of
deserialization. Deserialization of EventType will not create new EventType
objects.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final EventType | ROOT
The root event type. |
| private WeakHashMap | |
| private final EventType |
| Access | Constructor and Description |
|---|---|
| public | EventType()
Deprecated
Do not use this constructor, as only one such EventType can exist
Constructs a new |
| public | |
| public | |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final String | |
| public final EventType | |
| private void | |
| public String | Returns: a string representation of thisEventType object.Overrides java. Returns a string representation of this |
| private Object |
| name | back to summary |
|---|---|
private final String name
| |
| ROOT | back to summary |
|---|---|
| public static final EventType<Event> ROOT The root event type. All other event types are either direct or
indirect sub types of it. It is also the only event type which
has its super event type set to | |
| subTypes | back to summary |
|---|---|
private WeakHashMap<EventType<? extends T>, Void> subTypes
| |
| superType | back to summary |
|---|---|
private final EventType<? super T> superType
| |
| EventType | back to summary |
|---|---|
| public EventType()
Deprecated Do not use this constructor, as only one such EventType can exist Constructs a new
| |
| EventType | back to summary |
|---|---|
| public EventType(final String name) Constructs a new
| |
| EventType | back to summary |
|---|---|
| public EventType(final EventType<? super T> superType) Constructs a new
| |
| EventType | back to summary |
|---|---|
| public EventType(final EventType<? super T> superType, final String name) Constructs a new
| |
| EventType | back to summary |
|---|---|
| pack-priv EventType(final String name, final EventType<? super T> superType) Internal constructor that skips various checks | |
| getName | back to summary |
|---|---|
| public final String getName() Gets the name of this event type.
| |
| getSuperType | back to summary |
|---|---|
| public final EventType Gets the super type of this event type. The returned value is
| |
| register | back to summary |
|---|---|
| private void register(EventType<? extends T> subType) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| writeReplace | back to summary |
|---|---|
private Object writeReplace()
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private EventType | |
| private Object |
| path | back to summary |
|---|---|
| private List<String> path | |
| EventTypeSerialization | back to summary |
|---|---|
| public EventTypeSerialization(List<String> path) | |
| findSubType | back to summary |
|---|---|
| private EventType | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() throws ObjectStreamException | |