org.eclipse.ocl.uml.options
Enum EvaluationMode

java.lang.Object
  extended by java.lang.Enum<EvaluationMode>
      extended by org.eclipse.ocl.uml.options.EvaluationMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EvaluationMode>

public enum EvaluationMode
extends java.lang.Enum<EvaluationMode>

Enumeration of evaluation modes, indicating how the UML evaluation environment implementation is to interpret instances: as instance specifications in a UML model (M1 level, INSTANCE_MODEL) or as objects in the modeled system (M0 level, RUNTIME_OBJECTS). The special ADAPTIVE value attempts to determine this mode automatically from the evaluation context object (self).

Since:
1.2
Author:
Christian W. Damus (cdamus)

Enum Constant Summary
ADAPTIVE
          Automatically determine the effective modeling level from the context element.
INSTANCE_MODEL
          Instances are modeled at the M1 level (in the user model).
RUNTIME_OBJECTS
          Instances are run-time objects at the M0 (in the modeled system).
 
Method Summary
static EvaluationMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EvaluationMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE_MODEL

public static final EvaluationMode INSTANCE_MODEL
Instances are modeled at the M1 level (in the user model).


RUNTIME_OBJECTS

public static final EvaluationMode RUNTIME_OBJECTS
Instances are run-time objects at the M0 (in the modeled system).


ADAPTIVE

public static final EvaluationMode ADAPTIVE
Automatically determine the effective modeling level from the context element. This has problems when the context element is an InstanceSpecification of some kind in the user model, because it will be assumed to mean M1 level (INSTANCE_MODEL) rather than M0 level (RUNTIME_OBJECTS) despite the fact that the latter is more appropriate for expressions on the UML metamodel.

Method Detail

values

public static EvaluationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EvaluationMode c : EvaluationMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EvaluationMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null