com.fasterxml.jackson.annotation
Enum JsonCreator.Mode

java.lang.Object
  extended by java.lang.Enum<JsonCreator.Mode>
      extended by com.fasterxml.jackson.annotation.JsonCreator.Mode
All Implemented Interfaces:
Serializable, Comparable<JsonCreator.Mode>
Enclosing class:
JsonCreator

public static enum JsonCreator.Mode
extends Enum<JsonCreator.Mode>

Since:
2.5

Enum Constant Summary
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
static JsonCreator.Mode valueOf(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
clone, compareTo, equals, finalize, 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(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–2016 FasterXML. All rights reserved.