Package com.github.jasminb.jsonapi
Enum DeserializationFeature
- java.lang.Object
-
- java.lang.Enum<DeserializationFeature>
-
- com.github.jasminb.jsonapi.DeserializationFeature
-
- All Implemented Interfaces:
Serializable,Comparable<DeserializationFeature>
public enum DeserializationFeature extends Enum<DeserializationFeature>
Enumeration that defines list of deserialization features that can be set toResourceConverter.- Author:
- jbegic
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW_UNKNOWN_INCLUSIONSThis option determines whether encountering unknown types results inIllegalArgumentExceptionbeing thrown, or if parsing continues and the unknown field is ignored.ALLOW_UNKNOWN_TYPE_IN_RELATIONSHIPThis option determines if relationship (collection) can have unknown type.REQUIRE_RESOURCE_IDThis option enforces presence of the 'id' attribute in resources being parsed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<DeserializationFeature>getDefaultFeatures()Returns set of features that are enabled by default.static DeserializationFeaturevalueOf(String name)Returns the enum constant of this type with the specified name.static DeserializationFeature[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REQUIRE_RESOURCE_ID
public static final DeserializationFeature REQUIRE_RESOURCE_ID
This option enforces presence of the 'id' attribute in resources being parsed.
-
ALLOW_UNKNOWN_INCLUSIONS
public static final DeserializationFeature ALLOW_UNKNOWN_INCLUSIONS
This option determines whether encountering unknown types results inIllegalArgumentExceptionbeing thrown, or if parsing continues and the unknown field is ignored.
-
ALLOW_UNKNOWN_TYPE_IN_RELATIONSHIP
public static final DeserializationFeature ALLOW_UNKNOWN_TYPE_IN_RELATIONSHIP
This option determines if relationship (collection) can have unknown type. Can be use with polymorphic relationship.
-
-
Method Detail
-
values
public static DeserializationFeature[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DeserializationFeature c : DeserializationFeature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DeserializationFeature 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 nameNullPointerException- if the argument is null
-
getDefaultFeatures
public static Set<DeserializationFeature> getDefaultFeatures()
Returns set of features that are enabled by default.- Returns:
- returns features that are enabled by default
-
-