Package com.github.cafapi.common.api
Enum Class DecodeMethod
- All Implemented Interfaces:
Serializable
,Comparable<DecodeMethod>
,Constable
Dictates the decoding method for a Codec, specifying whether the Codec should perform strict decoding or be more lenient which can help
in being tolerant to data from a subtly different class version of the object.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DecodeMethod
static DecodeMethod
Returns the enum constant of this class with the specified name.static DecodeMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRICT
A "strict" Codec should not allow unknown fields. It may also reject inputs with duplicate fields or fields that are null when null is not allowed. -
LENIENT
A "lenient" Codec may accept but ignore unknown fields, and may also accept duplicate entries within the input data (though how this behaves may be undefined). Unexpected nulls may be replaced with the primitive defaults.
-
-
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
-
getDefault
- Returns:
- the default, assumed DecodeMethod
-