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.
| Modifier and Type | Field 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 |
| 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. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static PropertyAccessor | |
| public static PropertyAccessor[] |
| ALL | back to summary |
|---|---|
| public static final PropertyAccessor ALL This pseudo-type indicates that all accessors are affected. | |
| CREATOR | back to summary |
|---|---|
| public static final PropertyAccessor CREATOR Creators are constructors and (static) factory methods used to construct POJO instances for deserialization | |
| FIELD | back 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. | |
| GETTER | back 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 | back 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 | |
| NONE | back to summary |
|---|---|
| public static final PropertyAccessor NONE This pseudo-type indicates that none of accessors if affected. | |
| SETTER | back to summary |
|---|---|
| public static final PropertyAccessor SETTER Setters are methods used to set a POJO value for deserialization. | |
| PropertyAccessor | back to summary |
|---|---|
| private PropertyAccessor() | |
| creatorEnabled | back to summary |
|---|---|
| public boolean creatorEnabled() | |
| fieldEnabled | back to summary |
|---|---|
| public boolean fieldEnabled() | |
| getterEnabled | back to summary |
|---|---|
| public boolean getterEnabled() | |
| isGetterEnabled | back to summary |
|---|---|
| public boolean isGetterEnabled() | |
| setterEnabled | back to summary |
|---|---|
| public boolean setterEnabled() | |
| valueOf | back to summary |
|---|---|
| public static PropertyAccessor valueOf(String name) | |
| values | back to summary |
|---|---|
| public static PropertyAccessor[] values() | |