Top Description Fields Constructors Methods
com.fasterxml.jackson.annotation

public final Enum PropertyAccessor

extends Enum<PropertyAccessor>
Class Inheritance

Enumeration used to define kinds of elements (called "property accessors") that annotations like JsonAutoDetect apply to.

In addition to method types (GETTER/IS_GETTER, SETTER, CREATOR) and the field type (FIELD), 2 pseudo-types are defined for convenience: ALWAYS and NONE. These can be used to indicate, all or none of available method types (respectively), for use by annotations that takes JsonMethod argument.

Field Summary

Modifier and TypeField and Description
public static final PropertyAccessor
ALL

This pseudo-type indicates that all accessors are affected.

public static final PropertyAccessor
CREATOR

Creators are constructors and (static) factory methods used to construct POJO instances for deserialization

public static final PropertyAccessor
FIELD

Field refers to fields of regular Java objects.

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.

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, or java.lang.Boolean).

public static final PropertyAccessor
NONE

This pseudo-type indicates that none of accessors if affected.

public static final PropertyAccessor
SETTER

Setters are methods used to set a POJO value for deserialization.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public boolean
public static PropertyAccessor
public static PropertyAccessor[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALLback to summary
public static final PropertyAccessor ALL

This pseudo-type indicates that all accessors are affected.

CREATORback to summary
public static final PropertyAccessor CREATOR

Creators are constructors and (static) factory methods used to construct POJO instances for deserialization

FIELDback to summary
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.

GETTERback to summary
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, if 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_GETTER is used.

IS_GETTERback to summary
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, or java.lang.Boolean).

NONEback to summary
public static final PropertyAccessor NONE

This pseudo-type indicates that none of accessors if affected.

SETTERback to summary
public static final PropertyAccessor SETTER

Setters are methods used to set a POJO value for deserialization.

Constructor Detail

PropertyAccessorback to summary
private PropertyAccessor()

Method Detail

creatorEnabledback to summary
public boolean creatorEnabled()
fieldEnabledback to summary
public boolean fieldEnabled()
getterEnabledback to summary
public boolean getterEnabled()
isGetterEnabledback to summary
public boolean isGetterEnabled()
setterEnabledback to summary
public boolean setterEnabled()
valueOfback to summary
public static PropertyAccessor valueOf(String name)
valuesback to summary
public static PropertyAccessor[] values()