public static enum JsonProperty.Access extends Enum<JsonProperty.Access>
JsonProperty.access()
property, specifying how property
may be accessed during serialization ("read") and deserialization ("write")
(note that the direction of read and write is from perspective of the property,
not from external data format: this may be confusing in some contexts).
Note that while this annotation modifies access to annotated property,
its effects may be further overridden by JsonIgnore
property:
if both annotations are present on an accessors, JsonIgnore
has precedence over this property.
This annotation property is, however, preferred over use of "split"
JsonIgnore
/JsonProperty
combination.
Enum Constant and Description |
---|
AUTO
Access setting which means that visibility rules are to be used
to automatically determine read- and/or write-access of this property.
|
READ_ONLY
Access setting that means that the property may only be read for serialization
(value accessed via "getter" Method, or read from Field)
but not written (set) during deserialization.
|
READ_WRITE
Access setting that means that the property will be accessed for both
serialization (writing out values as external representation)
and deserialization (reading values from external representation),
regardless of visibility rules.
|
WRITE_ONLY
Access setting that means that the property may only be written (set)
as part of deserialization (using "setter" method, or assigning to Field,
or passed as Creator argument)
but will not be read (get) for serialization, that is, the value of the property
is not included in serialization.
|
Modifier and Type | Method and Description |
---|---|
static JsonProperty.Access |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonProperty.Access[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonProperty.Access AUTO
public static final JsonProperty.Access READ_ONLY
public static final JsonProperty.Access WRITE_ONLY
public static final JsonProperty.Access READ_WRITE
public static JsonProperty.Access[] values()
for (JsonProperty.Access c : JsonProperty.Access.values()) System.out.println(c);
public static JsonProperty.Access valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2021 JBoss by Red Hat. All rights reserved.