Package jsonvalues.spec
Enum Class ERROR_CODE
- All Implemented Interfaces:
Serializable
,Comparable<ERROR_CODE>
,Constable
The `ERROR_CODE` enum represents various code codes that can be associated with validation errors when using JSON
value specifications (`JsSpecs`). Each code corresponds to a specific type of validation failure.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that an array size is greater than the specified maximum length.Indicates that an array size is lower than the specified minimum length.Represents a failed condition for an array value.Indicates that an array value was expected but a different type of value was encountered.Represents a failed condition for a binary (byte array) value.Indicates that a binary (byte array) value was expected but a different type of value was encountered.Indicates that a binary (byte array) value of a specified size was expected.Represents a failed condition for a boolean value.Indicates that a boolean value was expected but a different type of value was encountered.Represents a failed condition for a constant value.Represents a failed condition for a decimal number value.Indicates that a decimal number value was expected but a different type of value was encountered.Represents a failed condition for a double value.Indicates that a double number value was expected but a different type of value was encountered.A value from an enumeration is expectedIndicates that a `false` boolean value was expected but a different boolean value was encountered.Represents a failed condition for an instant (date/time) value.Indicates that an instant (date/time) value was expected but a different type of value was encountered.Represents a failed condition for an integer value.Indicates that an integer value was expected but a different type of value was encountered.Represents a failed condition for an integral number (integer or long).Indicates that an integral number (integer or long) was expected but a different type of value was encountered.Represents a failed condition for a long integer value.Indicates that a long integer value was expected but a different type of value was encountered.Indicates that a `null` value was expected but a non-null value was encountered.Indicates that a `null` value was encountered.Represents a failed condition for a numeric value.Indicates that a numeric value was expected but a different type of value was encountered.Represents a failed condition for an object value.Indicates that an object (JSON object) value was expected but a different type of value was encountered.All the specs from the `OneOf` spec was tried but the value doesn't confirm none of themIndicates that a required value is missing.Indicates that a specification is missing for validation.Represents a failed condition for a string value.Indicates that a string value was expected but a different type of value was encountered.Indicates that a `true` boolean value was expected but a different boolean value was encountered.Represents a failed condition for a generic JSON value. -
Method Summary
Modifier and TypeMethodDescriptionstatic ERROR_CODE
Returns the enum constant of this class with the specified name.static ERROR_CODE[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING_EXPECTED
Indicates that a string value was expected but a different type of value was encountered. -
STRING_CONDITION
Represents a failed condition for a string value. -
INT_EXPECTED
Indicates that an integer value was expected but a different type of value was encountered. -
BINARY_EXPECTED
Indicates that a binary (byte array) value was expected but a different type of value was encountered. -
BINARY_FIXED_LENGTH_EXPECTED
Indicates that a binary (byte array) value of a specified size was expected. -
INSTANT_EXPECTED
Indicates that an instant (date/time) value was expected but a different type of value was encountered. -
INT_CONDITION
Represents a failed condition for an integer value. -
LONG_EXPECTED
Indicates that a long integer value was expected but a different type of value was encountered. -
DOUBLE_EXPECTED
Indicates that a double number value was expected but a different type of value was encountered. -
LONG_CONDITION
Represents a failed condition for a long integer value. -
DOUBLE_CONDITION
Represents a failed condition for a double value. -
BOOLEAN_EXPECTED
Indicates that a boolean value was expected but a different type of value was encountered. -
BOOLEAN_CONDITION
Represents a failed condition for a boolean value. -
INTEGRAL_EXPECTED
Indicates that an integral number (integer or long) was expected but a different type of value was encountered. -
INTEGRAL_CONDITION
Represents a failed condition for an integral number (integer or long). -
DECIMAL_EXPECTED
Indicates that a decimal number value was expected but a different type of value was encountered. -
DECIMAL_CONDITION
Represents a failed condition for a decimal number value. -
TRUE_EXPECTED
Indicates that a `true` boolean value was expected but a different boolean value was encountered. -
FALSE_EXPECTED
Indicates that a `false` boolean value was expected but a different boolean value was encountered. -
OBJ_EXPECTED
Indicates that an object (JSON object) value was expected but a different type of value was encountered. -
OBJ_CONDITION
Represents a failed condition for an object value. -
BINARY_CONDITION
Represents a failed condition for a binary (byte array) value. -
ARRAY_EXPECTED
Indicates that an array value was expected but a different type of value was encountered. -
ARRAY_CONDITION
Represents a failed condition for an array value. -
NUMBER_EXPECTED
Indicates that a numeric value was expected but a different type of value was encountered. -
NUMBER_CONDITION
Represents a failed condition for a numeric value. -
INSTANT_CONDITION
Represents a failed condition for an instant (date/time) value. -
NULL_NOT_EXPECTED
Indicates that a `null` value was encountered. -
NULL_EXPECTED
Indicates that a `null` value was expected but a non-null value was encountered. -
REQUIRED
Indicates that a required value is missing. -
VALUE_CONDITION
Represents a failed condition for a generic JSON value. -
SPEC_MISSING
Indicates that a specification is missing for validation. -
CONSTANT_CONDITION
Represents a failed condition for a constant value. -
ARR_SIZE_LOWER_THAN_MIN
Indicates that an array size is lower than the specified minimum length. -
ARR_SIZE_GREATER_THAN_MAX
Indicates that an array size is greater than the specified maximum length. -
ENUM_SYMBOL_EXPECTED
A value from an enumeration is expected -
ONE_OF_SPEC_EXHAUSTED
All the specs from the `OneOf` spec was tried but the value doesn't confirm none of them
-
-
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
-