Enum CoercionInputShape

java.lang.Object
java.lang.Enum<CoercionInputShape>
com.fasterxml.jackson.databind.cfg.CoercionInputShape
All Implemented Interfaces:
Serializable, Comparable<CoercionInputShape>, java.lang.constant.Constable

public enum CoercionInputShape extends Enum<CoercionInputShape>
Set of input types (which mostly match one of JsonToken types) used for configuring CoercionActions to take when reading input into target types (specific type or LogicalType). Contains both physical input shapes (which match one of JsonToken types) and a few logical input shapes ("empty" variants).

Note that null input shape is explicitly not included as its configuration is distinct from other types.

Since:
2.12
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Shape of Array values from input (token sequence from JsonToken.START_ARRAY to JsonToken.END_ARRAY)
    Shape of binary data values from input, if expressed natively by underlying format (many textual formats, including JSON, do not have such shape); if so generally seen as JsonToken.VALUE_EMBEDDED_OBJECT.
    Shape of boolean values from input (tokens JsonToken.VALUE_TRUE and JsonToken.VALUE_FALSE)
    Special case of Array values with no actual content (sequence of 2 tokens: JsonToken.START_ARRAY, JsonToken.END_ARRAY): usually used to allow special coercion into "empty" or null target type.
    Special case of Object values with no actual content (sequence of 2 tokens: JsonToken.START_OBJECT, JsonToken.END_OBJECT): usually used to allow special coercion into "empty" or null target type.
    Special case for String values with no content (or, if allowed by format or specific configuration, also "blank" String, that is, all-whitespace content).
    Shape of floating point (non-integral) numeric values from input (token JsonToken.VALUE_NUMBER_FLOAT)
    Shape of integral (non-floating point) numeric values from input (token JsonToken.VALUE_NUMBER_INT)
    Shape of Object values from input (token sequence from JsonToken.START_OBJECT to JsonToken.END_OBJECT)
    Shape of string values from input (tokens JsonToken.VALUE_STRING)
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Array

      public static final CoercionInputShape Array
      Shape of Array values from input (token sequence from JsonToken.START_ARRAY to JsonToken.END_ARRAY)
    • Object

      public static final CoercionInputShape Object
      Shape of Object values from input (token sequence from JsonToken.START_OBJECT to JsonToken.END_OBJECT)
    • Integer

      public static final CoercionInputShape Integer
      Shape of integral (non-floating point) numeric values from input (token JsonToken.VALUE_NUMBER_INT)
    • Float

      public static final CoercionInputShape Float
      Shape of floating point (non-integral) numeric values from input (token JsonToken.VALUE_NUMBER_FLOAT)
    • Boolean

      public static final CoercionInputShape Boolean
      Shape of boolean values from input (tokens JsonToken.VALUE_TRUE and JsonToken.VALUE_FALSE)
    • String

      public static final CoercionInputShape String
      Shape of string values from input (tokens JsonToken.VALUE_STRING)
    • Binary

      public static final CoercionInputShape Binary
      Shape of binary data values from input, if expressed natively by underlying format (many textual formats, including JSON, do not have such shape); if so generally seen as JsonToken.VALUE_EMBEDDED_OBJECT.
    • EmptyArray

      public static final CoercionInputShape EmptyArray
      Special case of Array values with no actual content (sequence of 2 tokens: JsonToken.START_ARRAY, JsonToken.END_ARRAY): usually used to allow special coercion into "empty" or null target type.
    • EmptyObject

      public static final CoercionInputShape EmptyObject
      Special case of Object values with no actual content (sequence of 2 tokens: JsonToken.START_OBJECT, JsonToken.END_OBJECT): usually used to allow special coercion into "empty" or null target type.
    • EmptyString

      public static final CoercionInputShape EmptyString
      Special case for String values with no content (or, if allowed by format or specific configuration, also "blank" String, that is, all-whitespace content). usually used to allow special coercion into "empty" or null target type.
  • Method Details

    • values

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

      public static CoercionInputShape 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 name
      NullPointerException - if the argument is null