## org.eclipse.ocl.lpg
Enum ProblemHandler.Severity

    java.lang.Object
      java.lang.Enum<ProblemHandler.Severity>
          org.eclipse.ocl.lpg.ProblemHandler.Severity

All Implemented Interfaces:
  Serializable, Comparable<ProblemHandler.Severity>

Enclosing interface:
  ProblemHandler

    public static enum ProblemHandler.Severity

extends Enum<ProblemHandler.Severity>

Standard problem severities. The values are defined in increasing order of their severity.

Since:
  1.2

Enum Constant Summary
`CANCEL` Severity constant indicating a deliberate cancellation of the parsing operation by the user.
`ERROR` Severity constant indicating an error problem that does not prevent the parser from proceeding, but which does indicate an ill-formed construct.
`FATAL` Severity constant indicating an error problem that prevents the parser from continuing to process the remainder of the input.
`INFO` Severity constant indicating an informational message that, really, is not a problem but a hint or suggestion.
`OK` Severity constant indicating absence of any problem.
`WARNING` Severity constant indicating a warning problem.

Method Summary
`int` `getDiagnosticSeverity()`
`boolean` `isOK()` Am I the "OK" severity?
`String` `toString()`
`static ProblemHandler.Severity` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static ProblemHandler.Severity[]` `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

Enum Constant Detail

### OK

    public static final ProblemHandler.Severity OK

  Severity constant indicating absence of any problem. Corresponds to the EMF `Diagnostic` severity `Diagnostic.OK` and Eclipse `IStatus.OK`.

### INFO

    public static final ProblemHandler.Severity INFO

  Severity constant indicating an informational message that, really, is not a problem but a hint or suggestion. Corresponds to the EMF `Diagnostic` severity `Diagnostic.INFO` and Eclipse `IStatus.INFO`.

### WARNING

    public static final ProblemHandler.Severity WARNING

  Severity constant indicating a warning problem. Corresponds to the EMF `Diagnostic` severity `Diagnostic.WARNING` and Eclipse `IStatus.WARNING`.

### ERROR

    public static final ProblemHandler.Severity ERROR

  Severity constant indicating an error problem that does not prevent the parser from proceeding, but which does indicate an ill-formed construct. Corresponds to the EMF `Diagnostic` severity `Diagnostic.ERROR` and Eclipse `IStatus.ERROR`.

### FATAL

    public static final ProblemHandler.Severity FATAL

  Severity constant indicating an error problem that prevents the parser from continuing to process the remainder of the input. Corresponds to the EMF `Diagnostic` severity `Diagnostic.ERROR` and Eclipse `IStatus.ERROR`, because these frameworks do not distinguish between fatal and non-fatal conditions.

### CANCEL

    public static final ProblemHandler.Severity CANCEL

  Severity constant indicating a deliberate cancellation of the parsing operation by the user. Corresponds to the EMF `Diagnostic` severity `Diagnostic.CANCEL` and Eclipse `IStatus.CANCEL`. Cancellation in both of these frameworks, and in OCL, does not actually indicate an error condition despite its having the highest value. However, an operation that was canceled is incomplete and any results produced are necessarily invalid as in the case of `FATAL` errors.

Method Detail

### values

    public static final ProblemHandler.Severity[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(ProblemHandler.Severity c : ProblemHandler.Severity.values())
              System.out.println(c);

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

### valueOf

    public static ProblemHandler.Severity valueOf(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:
    `IllegalArgumentException` - if this enum type has no constant with the specified name

### getDiagnosticSeverity

    public int getDiagnosticSeverity()

### isOK

    public boolean isOK()

  Am I the "OK" severity?

  Returns:
    whether I am OK
  See Also:
    `OK`

### toString

    public String toString()

  Overrides:
    `toString` in class `Enum<ProblemHandler.Severity>`

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