public class Event extends EventObject
The base class for all events generated by this library.
The events produced by objects in this library are arranged in an inheritance hierarchy. This base class defines some
basic properties common to all configuration events. Especially, an event has an EventType
which describes
its semantics. The event type can also be used for filtering for events or for defining event listeners on a
fine-grained basis.
Modifier and Type | Field and Description |
---|---|
static EventType<Event> |
ANY
The root event type for all configuration-related events.
|
source
Constructor and Description |
---|
Event(Object source,
EventType<? extends Event> evType)
Creates a new instance of
Event and sets basic properties. |
Modifier and Type | Method and Description |
---|---|
protected void |
appendPropertyRepresentation(StringBuilder buf,
String property,
Object value)
Helper method for appending a representation for a property to the overall string representation for this object.
|
EventType<? extends Event> |
getEventType()
Returns the type of this event.
|
String |
toString()
Returns a string representation for this object.
|
getSource
public Event(Object source, EventType<? extends Event> evType)
Event
and sets basic properties.source
- the object on which the Event initially occurred (must not be null)evType
- the type of this event (must not be null)IllegalArgumentException
- if a required parameter is nullpublic EventType<? extends Event> getEventType()
public String toString()
toString
in class EventObject
protected void appendPropertyRepresentation(StringBuilder buf, String property, Object value)
toString()
for generating string fragments for the properties of this class. It can
also be used by derived classes which extend the string representation of this base class.buf
- the target bufferproperty
- the name of the propertyvalue
- the property valueCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.