com.fasterxml.jackson.databind.cfg

Enum CoercionInputShape

  • All Implemented Interfaces:
    Serializable, Comparable<CoercionInputShape>


    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
    • Enum Constant Summary

      Enum Constants 
      Enum Constant and Description
      Array
      Shape of Array values from input (token sequence from JsonToken.START_ARRAY to JsonToken.END_ARRAY)
      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.
      Boolean
      Shape of boolean values from input (tokens JsonToken.VALUE_TRUE and JsonToken.VALUE_FALSE)
      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
      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
      Special case for String values with no content (or, if allowed by format or specific configuration, also "blank" String, that is, all-whitespace content).
      Float
      Shape of floating point (non-integral) numeric values from input (token JsonToken.VALUE_NUMBER_FLOAT)
      Integer
      Shape of integral (non-floating point) numeric values from input (token JsonToken.VALUE_NUMBER_INT)
      Object
      Shape of Object values from input (token sequence from JsonToken.START_OBJECT to JsonToken.END_OBJECT)
      String
      Shape of string values from input (tokens JsonToken.VALUE_STRING)
    • Enum Constant Detail

      • 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 Detail

      • values

        public static CoercionInputShape[] 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 (CoercionInputShape c : CoercionInputShape.values())
            System.out.println(c);
        
        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

Copyright © 2008–2023 FasterXML. All rights reserved.