@Target(value={ANNOTATION_TYPE,TYPE}) @Retention(value=RUNTIME) public @interface JsonAutoDetect
Default setting for all accessors is JsonAutoDetect.Visibility.DEFAULT
, which
in turn means that the global defaults are used. Defaults
are different for different accessor types (getters need to be public;
setters can have any access modifier, for example).
If you assign different JsonAutoDetect.Visibility
type then it will override
global defaults: for example, to require that all setters must be public,
you would use:
@JsonAutoDetect(setterVisibility=Visibility.PUBLIC_ONLY)
Modifier and Type | Optional Element and Description |
---|---|
JsonAutoDetect.Visibility |
creatorVisibility
Minimum visibility required for auto-detecting Creator methods,
except for no-argument constructors (which are always detected
no matter what).
|
JsonAutoDetect.Visibility |
fieldVisibility
Minimum visibility required for auto-detecting member fields.
|
JsonAutoDetect.Visibility |
getterVisibility
Minimum visibility required for auto-detecting regular getter methods.
|
JsonAutoDetect.Visibility |
isGetterVisibility
Minimum visibility required for auto-detecting is-getter methods.
|
JsonAutoDetect.Visibility |
setterVisibility
Minimum visibility required for auto-detecting setter methods.
|
public abstract JsonAutoDetect.Visibility getterVisibility
public abstract JsonAutoDetect.Visibility isGetterVisibility
public abstract JsonAutoDetect.Visibility setterVisibility
public abstract JsonAutoDetect.Visibility creatorVisibility
public abstract JsonAutoDetect.Visibility fieldVisibility
Copyright © 2008–2018 FasterXML. All rights reserved.