Enum Class RuntimeContract
- All Implemented Interfaces:
Serializable, Comparable<RuntimeContract>, Constable
Contract kinds used by generated enforcement code.
Each value maps a built-in contract annotation to the corresponding
runtime evaluation rule. This enum is part of the generated-code bridge;
application code normally uses media.barney.contract.Contract
annotations directly.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNumeric contract requiring a value within configured bounds.Numeric contract requiring a value less than zero.Numeric contract requiring a value greater than or equal to zero.Numeric contract requiring a value less than or equal to zero.Non-blank contract for character sequences.Non-empty contract for character sequences, collections, maps, and arrays.Pattern contract requiring a character sequence to fully match a regular expression.Numeric contract requiring a value greater than zero.Size contract for character sequences, collections, maps, and arrays. -
Method Summary
Modifier and TypeMethodDescriptionstatic RuntimeContractReturns the enum constant of this class with the specified name.static RuntimeContract[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_EMPTY
Non-empty contract for character sequences, collections, maps, and arrays. -
NOT_BLANK
Non-blank contract for character sequences. -
POSITIVE
Numeric contract requiring a value greater than zero. -
NEGATIVE
Numeric contract requiring a value less than zero. -
NON_NEGATIVE
Numeric contract requiring a value greater than or equal to zero. -
NON_POSITIVE
Numeric contract requiring a value less than or equal to zero. -
IN_RANGE
Numeric contract requiring a value within configured bounds. -
SIZE
Size contract for character sequences, collections, maps, and arrays. -
PATTERN
Pattern contract requiring a character sequence to fully match a regular expression.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-