IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.emf.validation
Class EMFEventType

java.lang.Object
  extended bycom.ibm.xtools.emf.validation.EMFEventType
All Implemented Interfaces:
INullObject, Serializable

public final class EMFEventType
extends Object
implements INullObject, Serializable

An enumeration of named EMF event types. These correspond to the int constants defined by the Notification interface in the EMF API. 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 List 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 named instance.
 String getName()
          Obtains my symbolic name.
 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 named 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 getAllInstances()
Obtains all values of the enumeration.

Returns:
all values

getName

public final String getName()
Obtains my symbolic name.

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

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.

Specified by:
isNull in interface INullObject
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()

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.