## org.eclipse.emf.validation
Class EMFEventType

    java.lang.Object
      org.eclipse.emf.validation.EMFEventType

All Implemented Interfaces:
  Serializable

    public final class EMFEventType

extends Object
implements Serializable

An enumeration of named EMF event types. There are two types of EMF event types. The first type correspond to the `int` constants defined by the `Notification` interface in the EMF API. The second type correspond to event types contributed through the `eventTypes`extension point XML. This enumeration assigns names corresponding to the event names in the `constraintProviders` extension point XML.``

See Also:
  `Notification`, Serialized Form

Field Summary
`static EMFEventType` `ADD` The EMF "Add" event (corresponds to `Notification.ADD`).
`static EMFEventType` `ADD_MANY` The EMF "Add Many" event (corresponds to `Notification.ADD_MANY`).
`static EMFEventType` `CREATE` A custom "Create" event, which is not implemented by EMF any longer but may be simulated by clients of the validation framework.
`static EMFEventType` `MOVE` The EMF "Move" event (corresponds to `Notification.MOVE`).
`static EMFEventType` `NULL` This special value is a pointer-safe null value according to the Null Object pattern.
`static EMFEventType` `REMOVE` The EMF "Remove" event (corresponds to `Notification.REMOVE`).
`static EMFEventType` `REMOVE_MANY` The EMF "Remove Many" event (corresponds to `Notification.REMOVE_MANY`).
`static EMFEventType` `REMOVING_ADAPTER` The EMF "Removing Adapter" event (corresponds to `Notification.REMOVING_ADAPTER`).
`static EMFEventType` `RESOLVE` The EMF "Resolve" event (corresponds to `Notification.RESOLVE`).
`static EMFEventType` `SET` The EMF "Set" event (corresponds to `Notification.SET`).
`static EMFEventType` `UNSET` The EMF "Unset" event (corresponds to `Notification.UNSET`).

Method Summary
`static void` `addEventType(String name, boolean featureSpecific)` Adds a custom event type to the list of event types
`static List<EMFEventType>` `getAllInstances()` Obtains all values of the enumeration.
`static EMFEventType` `getInstance(int code)` Obtains the instance corresponding to the specified EMF notification type `code`.
`static EMFEventType` `getInstance(String name)` Obtains the `name`d instance.
`String` `getName()` Obtains my symbolic name.
`static List<EMFEventType>` `getPredefinedInstances()` Obtains all predefined values of the enumeration, that is, those who were not contributed through the extension point XML
`boolean` `isFeatureSpecific()` Queries whether I am an event that notifies for changes in features only.
`boolean` `isNull()` Queries whether I am the Null Object of this enumeration.
`int` `toNotificationType()` Converts me to the EMF `Notification` type code.
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ADD

    public static final EMFEventType ADD

  The EMF "Add" event (corresponds to `Notification.ADD`).

### ADD_MANY

    public static final EMFEventType ADD_MANY

  The EMF "Add Many" event (corresponds to `Notification.ADD_MANY`).

### MOVE

    public static final EMFEventType MOVE

  The EMF "Move" event (corresponds to `Notification.MOVE`).

### REMOVE

    public static final EMFEventType REMOVE

  The EMF "Remove" event (corresponds to `Notification.REMOVE`).

### REMOVE_MANY

    public static final EMFEventType REMOVE_MANY

  The EMF "Remove Many" event (corresponds to `Notification.REMOVE_MANY`).

### SET

    public static final EMFEventType SET

  The EMF "Set" event (corresponds to `Notification.SET`).

### UNSET

    public static final EMFEventType UNSET

  The EMF "Unset" event (corresponds to `Notification.UNSET`).

### RESOLVE

    public static final EMFEventType RESOLVE

  The EMF "Resolve" event (corresponds to `Notification.RESOLVE`).

### REMOVING_ADAPTER

    public static final EMFEventType REMOVING_ADAPTER

  The EMF "Removing Adapter" event (corresponds to `Notification.REMOVING_ADAPTER`).

### CREATE

    public static final EMFEventType CREATE

  A custom "Create" event, which is not implemented by EMF any longer but may be simulated by clients of the validation framework. (Corresponds to `0`).

### NULL

    public static final EMFEventType NULL

  This special value is a pointer-safe null value according to the Null Object pattern. It indicates the absence of an EMF event trigger.

Method Detail

### getInstance

    public static EMFEventType getInstance(String name)

  Obtains the `name`d instance.

  Parameters:
    `name` - the name to retrieve (not case-sensitive)
  Returns:
    the corresponding instance, or `NULL` if no matching instance exists

### getInstance

    public static EMFEventType getInstance(int code)

  Obtains the instance corresponding to the specified EMF notification type `code`.

  Parameters:
    `code` - the EMF `Notification` type code
  Returns:
    the corresponding instance of this class, or `NULL` if no matching instance exists

### getAllInstances

    public static final List<EMFEventType> getAllInstances()

  Obtains all values of the enumeration.

  Returns:
    all values

### getPredefinedInstances

    public static final List<EMFEventType> getPredefinedInstances()

  Obtains all predefined values of the enumeration, that is, those who were not contributed through the extension point XML

  Returns:
    all predefined values
  Since:
    1.1

### getName

    public final String getName()

  Obtains my symbolic name.

  Returns:
    my name
  See Also:
    `getInstance(java.lang.String)`

### addEventType

    public static void addEventType(String name,
                                    boolean featureSpecific)

  Adds a custom event type to the list of event types

  Parameters:
    `name` - my name
    `featureSpecific` - whether the event is specific to features only, not to objects
  Throws:
    `IllegalArgumentException` - on attempt to define an event type with a name that is already used
  Since:
    1.1

### isFeatureSpecific

    public final boolean isFeatureSpecific()

  Queries whether I am an event that notifies for changes in features only. As a special case, the `NULL` event type is not feature-specific.

  Returns:
    `false` if I can indicate a change in the state of an object that is not feature-specific; `true`, otherwise

### isNull

    public boolean isNull()

  Queries whether I am the Null Object of this enumeration. In general, `null` pointers are never used with this type.

  Returns:
    whether I am the `NULL` instance

### toNotificationType

    public int toNotificationType()

  Converts me to the EMF `Notification` type code.

  Returns:
    my corresponding EMF notification type

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.