|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={ANNOTATION_TYPE,TYPE}) @Retention(value=RUNTIME) public @interface JsonAutoDetect
Class annotation that can be used to define which kinds of Methods are to be detected by auto-detection. Auto-detection means using name conventions and/or signature templates to find methods to use for data binding. For example, so-called "getters" can be auto-detected by looking for public member methods that return a value, do not take argument, and have prefix "get" in their name.
Pseudo-value NONE
means that all auto-detection is disabled
for the specific class that annotation is applied to (including
its super-types, but only when resolving that class).
Pseudo-value ALWAYS
means that auto-detection is enabled
for all method types for the class in similar way.
The default value is ALWAYS
: that is, by default, auto-detection
is enabled for all classes unless instructed otherwise.
Starting with version 1.5, it is also possible to use more fine-grained definitions, to basically define minimum visibility level needed. Defaults are different for different types (getters need to be public; setters can have any access modifier, for example).
Optional Element Summary | |
---|---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |