org.codehaus.jackson.map
Enum DeserializationConfig.Feature

java.lang.Object
  extended by java.lang.Enum<DeserializationConfig.Feature>
      extended by org.codehaus.jackson.map.DeserializationConfig.Feature
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DeserializationConfig.Feature>
Enclosing class:
DeserializationConfig

public static enum DeserializationConfig.Feature
extends java.lang.Enum<DeserializationConfig.Feature>

Enumeration that defines togglable features that guide the serialization feature.


Enum Constant Summary
AUTO_DETECT_CREATORS
          Feature that determines whether "creator" methods are automatically detected by consider public constructors, and static single argument methods with name "valueOf".
AUTO_DETECT_SETTERS
          Feature that determines whether "setter" methods are automatically detected based on standard Bean naming convention or not.
CAN_OVERRIDE_ACCESS_MODIFIERS
          Feature that determines whether method and field access modifier settings can be overridden when accessing properties.
USE_BIG_DECIMAL_FOR_FLOATS
          Feature that determines whether Json floating point numbers are to be deserialized into BigDecimals if only generic type description (either Object or Number, or within untyped Map or Collection context) is available.
USE_BIG_INTEGER_FOR_INTS
          Feature that determines whether Json integral (non-floating-point) numbers are to be deserialized into BigIntegers if only generic type description (either Object or Number, or within untyped Map or Collection context) is available.
USE_GETTERS_AS_SETTERS
          Feature that determines whether otherwise regular "getter" methods (but only ones that handle Collections and Maps, not getters of other type) can be used for purpose of getting a reference to a Collection and Map to modify the property, without requiring a setter method.
 
Method Summary
static int collectDefaults()
          Method that calculates bit set (flags) of all features that are enabled by default.
 boolean enabledByDefault()
           
 int getMask()
           
static DeserializationConfig.Feature valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DeserializationConfig.Feature[] 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

AUTO_DETECT_SETTERS

public static final DeserializationConfig.Feature AUTO_DETECT_SETTERS
Feature that determines whether "setter" methods are automatically detected based on standard Bean naming convention or not. If yes, then all public one-argument methods that start with prefix "set" are considered setters. If disabled, only methods explicitly annotated are considered setters.

Note that this feature has lower precedence than per-class annotations, and is only used if there isn't more granular configuration available.

Feature is enabled by default.


AUTO_DETECT_CREATORS

public static final DeserializationConfig.Feature AUTO_DETECT_CREATORS
Feature that determines whether "creator" methods are automatically detected by consider public constructors, and static single argument methods with name "valueOf". If disabled, only methods explicitly annotated are considered creator methods (except for the no-arg default constructor which is always considered a factory method).

Note that this feature has lower precedence than per-class annotations, and is only used if there isn't more granular configuration available.

Feature is enabled by default.


USE_GETTERS_AS_SETTERS

public static final DeserializationConfig.Feature USE_GETTERS_AS_SETTERS
Feature that determines whether otherwise regular "getter" methods (but only ones that handle Collections and Maps, not getters of other type) can be used for purpose of getting a reference to a Collection and Map to modify the property, without requiring a setter method. This is similar to how JAXB framework sets Collections and Maps: no setter is involved, just setter.

Note that such getters-as-setters methods have lower precedence than setters, so they are only used if no setter is found for the Map/Collection property.

Feature is enabled by default.


CAN_OVERRIDE_ACCESS_MODIFIERS

public static final DeserializationConfig.Feature CAN_OVERRIDE_ACCESS_MODIFIERS
Feature that determines whether method and field access modifier settings can be overridden when accessing properties. If enabled, method AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean) may be called to enable access to otherwise unaccessible objects.


USE_BIG_DECIMAL_FOR_FLOATS

public static final DeserializationConfig.Feature USE_BIG_DECIMAL_FOR_FLOATS
Feature that determines whether Json floating point numbers are to be deserialized into BigDecimals if only generic type description (either Object or Number, or within untyped Map or Collection context) is available. If enabled such values will be deserialized as BigDecimals; if disabled, will be deserialized as Doubles.

Feature is disabled by default, meaning that "untyped" floating point numbers will by default be deserialized as Doubles (choice is for performance reason -- BigDecimals are slower than Doubles)


USE_BIG_INTEGER_FOR_INTS

public static final DeserializationConfig.Feature USE_BIG_INTEGER_FOR_INTS
Feature that determines whether Json integral (non-floating-point) numbers are to be deserialized into BigIntegers if only generic type description (either Object or Number, or within untyped Map or Collection context) is available. If enabled such values will be deserialized as BigIntegers; if disabled, will be deserialized as "smallest" available type, which is either Integer, Long or BigInteger, depending on number of digits.

Feature is disabled by default, meaning that "untyped" floating point numbers will by default be deserialized using whatever is the most compact integral type, to optimize efficiency.

Method Detail

values

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

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DeserializationConfig.Feature 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

collectDefaults

public static int collectDefaults()
Method that calculates bit set (flags) of all features that are enabled by default.


enabledByDefault

public boolean enabledByDefault()

getMask

public int getMask()