Top Description Fields Constructors Methods
java.util

public Class EventObject

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
javax.net.ssl.HandshakeCompletedEvent, javax.net.ssl.SSLSessionBindingEvent

The root class from which all event state objects shall be derived.

All Events are constructed with a reference to the object, the "source", that is logically deemed to be the object upon which the Event in question initially occurred upon.

Since
1.1

Field Summary

Modifier and TypeField and Description
private static final long
protected transient Object
source

The object on which the Event initially occurred.

Constructor Summary

AccessConstructor and Description
public
EventObject(Object
the object on which the Event initially occurred
source
)

Constructs a prototypical Event.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the object on which the Event initially occurred
getSource
()

The object on which the Event initially occurred.

public String

Returns:

a String representation of this EventObject
toString
()

Overrides java.lang.Object.toString.

Returns a String representation of this EventObject.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
Annotations
@Serial
sourceback to summary
protected transient Object source

The object on which the Event initially occurred.

Constructor Detail

EventObjectback to summary
public EventObject(Object source)

Constructs a prototypical Event.

Parameters
source:Object

the object on which the Event initially occurred

Exceptions
IllegalArgumentException:
if source is null

Method Detail

getSourceback to summary
public Object getSource()

The object on which the Event initially occurred.

Returns:Object

the object on which the Event initially occurred

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a String representation of this EventObject.

Returns:String

a String representation of this EventObject