|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<PropertyAccessor> com.fasterxml.jackson.annotation.PropertyAccessor
public enum PropertyAccessor
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.
Enum Constant Summary | |
---|---|
ALL
This pseudo-type indicates that all accessors are affected. |
|
CREATOR
Creators are constructors and (static) factory methods used to construct POJO instances for deserialization |
|
FIELD
Field refers to fields of regular Java objects. |
|
GETTER
Getters 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, or Boolean ). |
|
NONE
This pseudo-type indicates that none of accessors if affected. |
|
SETTER
Setters are methods used to set a POJO value for deserialization. |
Method Summary | |
---|---|
boolean |
creatorEnabled()
|
boolean |
fieldEnabled()
|
boolean |
getterEnabled()
|
boolean |
isGetterEnabled()
|
boolean |
setterEnabled()
|
static PropertyAccessor |
valueOf(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. |
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 |
---|
public static final PropertyAccessor GETTER
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}.
public static final PropertyAccessor SETTER
public static final PropertyAccessor CREATOR
public static final PropertyAccessor FIELD
public static final PropertyAccessor IS_GETTER
Boolean
).
public static final PropertyAccessor NONE
public static final PropertyAccessor ALL
Method Detail |
---|
public static PropertyAccessor[] values()
for (PropertyAccessor c : PropertyAccessor.values()) System.out.println(c);
public static PropertyAccessor valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic boolean creatorEnabled()
public boolean getterEnabled()
public boolean isGetterEnabled()
public boolean setterEnabled()
public boolean fieldEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |