org.eclipse.ocl.helper
Enum ConstraintKind

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

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

An enumeration of OCL constraint types, primarily for determining the appropriate choices for syntax completion and for generic helper-based parsing.

Author:
Christian W. Damus (cdamus)
See Also:
OCLHelper.getSyntaxHelp(ConstraintKind, String), OCLHelper.createConstraint(ConstraintKind, String)

Enum Constant Summary
BODYCONDITION
          Indicates an operation body condition context.
DEFINITION
          Indicates an additional attribute operation definition context.
DERIVATION
          Indicates an attribute derived-value constraint context.
INITIAL
          Indicates an attribute initial-value constraint context.
INVARIANT
          Indicates an invariant constraint context.
POSTCONDITION
          Indicates an operation postcondition context.
PRECONDITION
          Indicates an operation precondition context.
 
Method Summary
static ConstraintKind valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ConstraintKind[] 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

INVARIANT

public static final ConstraintKind INVARIANT
Indicates an invariant constraint context. This is also an appropriate value for syntax-completion of query expressions.


PRECONDITION

public static final ConstraintKind PRECONDITION
Indicates an operation precondition context.


BODYCONDITION

public static final ConstraintKind BODYCONDITION
Indicates an operation body condition context.


POSTCONDITION

public static final ConstraintKind POSTCONDITION
Indicates an operation postcondition context.


INITIAL

public static final ConstraintKind INITIAL
Indicates an attribute initial-value constraint context.


DERIVATION

public static final ConstraintKind DERIVATION
Indicates an attribute derived-value constraint context.


DEFINITION

public static final ConstraintKind DEFINITION
Indicates an additional attribute operation definition context.

Method Detail

values

public static ConstraintKind[] 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 (ConstraintKind c : ConstraintKind.values())
    System.out.println(c);

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

valueOf

public static ConstraintKind 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