# Interface WatchpointEvent

All Superinterfaces:
  `Event, Locatable, LocatableEvent, Mirror`

All Known Subinterfaces:
  `AccessWatchpointEvent, ModificationWatchpointEvent`

public interface WatchpointEvent extends LocatableEvent
Notification of a field triggered event encountered by a thread in the target VM.

Since:
  1.3
See Also:
  - `EventQueue`
  - `VirtualMachine`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Field`
  `field()`
  Returns the field that is about to be accessed/modified.
  `ObjectReference`
  `object()`
  Returns the object whose field is about to be accessed/modified.
  `Value`
  `valueCurrent()`
  Current value of the field.

  ### Methods declared in interface Event

  `request`
  Modifier and Type
  Method
  Description
  `EventRequest`
  `request()`

  ### Methods declared in interface Locatable

  `location`
  Modifier and Type
  Method
  Description
  `Location`
  `location()`
  Returns the `Location` of this mirror, if there is executable code associated with it.

  ### Methods declared in interface LocatableEvent

  `thread`
  Modifier and Type
  Method
  Description
  `ThreadReference`
  `thread()`
  Returns the thread in which this event has occurred.

  ### Methods declared in interface Mirror

  `toString, virtualMachine`
  Modifier and Type
  Method
  Description
  `String`
  `toString()`
  Returns a String describing this mirror
  `VirtualMachine`
  `virtualMachine()`
  Gets the VirtualMachine to which this Mirror belongs.

- ## Method Details

  - ### field

    Field field()
    Returns the field that is about to be accessed/modified.
    Returns:
      a `Field` which mirrors the field in the target VM.
    Throws:
      `ObjectCollectedException` - may be thrown if class has been garbage collected.

  - ### object

    ObjectReference object()
    Returns the object whose field is about to be accessed/modified. Return null is the access is to a static field.
    Returns:
      a `ObjectReference` which mirrors the event's object in the target VM.

  - ### valueCurrent

    Value valueCurrent()
    Current value of the field.
    Throws:
      `ObjectCollectedException` - if object or class have been garbage collected.