Package java.util

Class EventObject

java.lang.Object
java.util.EventObject
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConnectionEvent, HandshakeCompletedEvent, NodeChangeEvent, PreferenceChangeEvent, PropertyChangeEvent, RowSetEvent, SSLSessionBindingEvent, StatementEvent

public class EventObject
extends Object
implements Serializable
EventObjects represent events. Typically applications subclass this class to add event specific information.
See Also:
EventListener, Serialized Form
  • Field Details

    • source

      protected transient Object source
  • Constructor Details

    • EventObject

      public EventObject​(Object source)
      Constructs a new instance of this class.
      Parameters:
      source - the object which fired the event.
  • Method Details

    • getSource

      public Object getSource()
      Returns the object which fired the event.
    • toString

      public String toString()
      Returns the string representation of this EventObject.
      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.