Enum Class Contract.Kind

java.lang.Object
java.lang.Enum<Contract.Kind>
org.checkerframework.framework.util.Contract.Kind
All Implemented Interfaces:
Serializable, Comparable<Contract.Kind>, Constable
Enclosing class:
Contract

public static enum Contract.Kind extends Enum<Contract.Kind>
Enumerates the kinds of contracts.
  • Enum Constant Details

    • PRECONDITION

      public static final Contract.Kind PRECONDITION
      A precondition.
    • POSTCONDITION

      public static final Contract.Kind POSTCONDITION
      A postcondition.
    • CONDITIONALPOSTCONDITION

      public static final Contract.Kind CONDITIONALPOSTCONDITION
      A conditional postcondition.
  • Field Details

    • errorKey

      public final String errorKey
      Used for constructing error messages.
    • metaAnnotation

      public final Class<? extends Annotation> metaAnnotation
      The meta-annotation identifying annotations of this kind: PreconditionAnnotation, PostconditionAnnotation, or ConditionalPostconditionAnnotation.
    • frameworkContractClass

      public final Class<? extends Annotation> frameworkContractClass
      The built-in framework qualifier for this contract: RequiresQualifier, EnsuresQualifier, or EnsuresQualifierIf.
    • frameworkContractListClass

      public final Class<? extends Annotation> frameworkContractListClass
      The built-in framework qualifier for repeated occurrences of this contract: RequiresQualifier.List, EnsuresQualifier.List, or EnsuresQualifierIf.List.
  • Method Details

    • values

      public static Contract.Kind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Contract.Kind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null