Package com.fasterxml.jackson.annotation
Enum PropertyAccessor
- java.lang.Object
 - 
- java.lang.Enum<PropertyAccessor>
 - 
- com.fasterxml.jackson.annotation.PropertyAccessor
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,java.lang.Comparable<PropertyAccessor>
public enum PropertyAccessor extends java.lang.Enum<PropertyAccessor>
Enumeration used to define kinds of elements (called "property accessors") that annotations likeJsonAutoDetectapply to.In addition to method types (GETTER/IS_GETTER, SETTER, CREATOR) and the field type (FIELD), 2 pseudo-types are defined for convenience:
ALWAYSandNONE. These can be used to indicate, all or none of available method types (respectively), for use by annotations that takesJsonMethodargument. 
- 
- 
Enum Constant Summary
Enum Constants Enum Constant Description ALLThis pseudo-type indicates that all accessors are affected.CREATORCreators are constructors and (static) factory methods used to construct POJO instances for deserializationFIELDField refers to fields of regular Java objects.GETTERGetters are methods used to get a POJO field value for serialization, or, under certain conditions also for de-serialization.IS_GETTER"Is getters" are getter-like methods that are named "isXxx" (instead of "getXxx" for getters) and return boolean value (either primitive, orBoolean).NONEThis pseudo-type indicates that none of accessors if affected.SETTERSetters are methods used to set a POJO value for deserialization. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreatorEnabled()booleanfieldEnabled()booleangetterEnabled()booleanisGetterEnabled()booleansetterEnabled()static PropertyAccessorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static PropertyAccessor[]values()Returns an array containing the constants of this enum type, in the order they are declared. 
 - 
 
- 
- 
Enum Constant Detail
- 
GETTER
public static final PropertyAccessor GETTER
Getters are methods used to get a POJO field value for serialization, or, under certain conditions also for de-serialization. Latter can be used for effectively setting Collection or Map values in absence of setters, iff returned value is not a copy but actual value of the logical property.Since version 1.3, this does NOT include "is getters" (methods that return boolean and named 'isXxx' for property 'xxx'); instead,
IS_GETTERis used}. 
- 
SETTER
public static final PropertyAccessor SETTER
Setters are methods used to set a POJO value for deserialization. 
- 
CREATOR
public static final PropertyAccessor CREATOR
Creators are constructors and (static) factory methods used to construct POJO instances for deserialization 
- 
FIELD
public static final PropertyAccessor FIELD
Field refers to fields of regular Java objects. Although they are not really methods, addition of optional field-discovery in version 1.1 meant that there was need to enable/disable their auto-detection, and this is the place to add it in. 
- 
IS_GETTER
public static final PropertyAccessor IS_GETTER
"Is getters" are getter-like methods that are named "isXxx" (instead of "getXxx" for getters) and return boolean value (either primitive, orBoolean). 
- 
NONE
public static final PropertyAccessor NONE
This pseudo-type indicates that none of accessors if affected. 
- 
ALL
public static final PropertyAccessor ALL
This pseudo-type indicates that all accessors are affected. 
 - 
 
- 
Method Detail
- 
values
public static PropertyAccessor[] 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 (PropertyAccessor c : PropertyAccessor.values()) System.out.println(c);
- Returns:
 - an array containing the constants of this enum type, in the order they are declared
 
 
- 
valueOf
public static PropertyAccessor 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 namejava.lang.NullPointerException- if the argument is null
 
- 
creatorEnabled
public boolean creatorEnabled()
 
- 
getterEnabled
public boolean getterEnabled()
 
- 
isGetterEnabled
public boolean isGetterEnabled()
 
- 
setterEnabled
public boolean setterEnabled()
 
- 
fieldEnabled
public boolean fieldEnabled()
 
 - 
 
 -