Enum JsonCreator.Mode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFAULT
      Pseudo-mode that indicates that caller is to use default heuristics for choosing mode to use.
      DELEGATING
      Mode that indicates that if creator takes a single argument, the whole incoming data value is to be bound into declared type of that argument; this "delegate" value is then passed as the argument to creator.
      DISABLED
      Pseudo-mode that indicates that creator is not to be used.
      PROPERTIES
      Mode that indicates that the argument(s) for creator are to be bound from matching properties of incoming Object value, using creator argument names (explicit or implicit) to match incoming Object properties to arguments.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static JsonCreator.Mode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static JsonCreator.Mode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • DEFAULT

        public static final JsonCreator.Mode DEFAULT
        Pseudo-mode that indicates that caller is to use default heuristics for choosing mode to use. This typically favors use of delegating mode for single-argument creators that take structured types.
      • DELEGATING

        public static final JsonCreator.Mode DELEGATING
        Mode that indicates that if creator takes a single argument, the whole incoming data value is to be bound into declared type of that argument; this "delegate" value is then passed as the argument to creator.
      • PROPERTIES

        public static final JsonCreator.Mode PROPERTIES
        Mode that indicates that the argument(s) for creator are to be bound from matching properties of incoming Object value, using creator argument names (explicit or implicit) to match incoming Object properties to arguments.

        Note that this mode is currently (2.5) always used for multiple-argument creators; the only ambiguous case is that of a single-argument creator.

      • DISABLED

        public static final JsonCreator.Mode DISABLED
        Pseudo-mode that indicates that creator is not to be used. This can be used as a result value for explicit disabling, usually either by custom annotation introspector, or by annotation mix-ins (for example when choosing different creator).
    • Method Detail

      • values

        public static JsonCreator.Mode[] 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 (JsonCreator.Mode c : JsonCreator.Mode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JsonCreator.Mode valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null