org.eclipse.handly.model.impl.support

## Class ElementChangeEvent

- java.lang.Object
- - org.eclipse.handly.model.impl.support.ElementChangeEvent

- All Implemented Interfaces:
    IElementChangeEvent

      public class ElementChangeEvent
      extends java.lang.Object
      implements IElementChangeEvent

  Default implementation of `IElementChangeEvent`.

- - ### Field Summary

    - ### Fields inherited from interface org.eclipse.handly.model.IElementChangeEvent

      `POST_CHANGE, POST_RECONCILE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElementChangeEvent(int type, IElementDelta... deltas)` Constructs an element change event with the given type and the given top-level deltas.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IElementDelta[]` | `getDeltas()` Returns the top-level deltas describing the change.
    `int` | `getType()` Returns the type of event being reported.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ElementChangeEvent

          public ElementChangeEvent(int type,
                                    IElementDelta... deltas)

      Constructs an element change event with the given type and the given top-level deltas.
      Parameters:
        `type` - the type of event being reported
        `deltas` - the top-level deltas describing the change (at least one delta is required)
      See Also:
        `IElementChangeEvent.POST_CHANGE`, `IElementChangeEvent.POST_RECONCILE`

  - ### Method Detail

    - #### getType

          public int getType()

      Description copied from interface: `IElementChangeEvent`
      Returns the type of event being reported.

      Some event types make sense for most models and are predefined in this interface, while others are model-specific and are defined by the model implementor. The range for model-specific types starts from `0x10000` and includes the upper 16 bits of `int` value. The lower 16 bits are reserved for predefined generic event types.

      Specified by:
        `getType` in interface `IElementChangeEvent`
      Returns:
        the type of event being reported
      See Also:
        `IElementChangeEvent.POST_CHANGE`, `IElementChangeEvent.POST_RECONCILE`

    - #### getDeltas

          public IElementDelta[] getDeltas()

      Description copied from interface: `IElementChangeEvent`
      Returns the top-level deltas describing the change. Each top-level delta describes a change in a separate element tree.
      Specified by:
        `getDeltas` in interface `IElementChangeEvent`
      Returns:
        the top-level deltas describing the change (never `null`, never empty). Clients must not modify the returned array.

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0