JsonAutoDetect (Jackson-annotations 2.1.0 API)
Date: 2012-10-05

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## com.fasterxml.jackson.annotation
Annotation Type JsonAutoDetect

    @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.

### getterVisibility

    public abstract JsonAutoDetect.Visibility getterVisibility

  Minimum visibility required for auto-detecting regular getter methods.

  Default:
    com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.DEFAULT

### isGetterVisibility

    public abstract JsonAutoDetect.Visibility isGetterVisibility

  Minimum visibility required for auto-detecting is-getter methods.

  Default:
    com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.DEFAULT

### setterVisibility

    public abstract JsonAutoDetect.Visibility setterVisibility

  Minimum visibility required for auto-detecting setter methods.

  Default:
    com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.DEFAULT

### creatorVisibility

    public abstract JsonAutoDetect.Visibility creatorVisibility

  Minimum visibility required for auto-detecting Creator methods, except for no-argument constructors (which are always detected no matter what).

  Default:
    com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.DEFAULT

### fieldVisibility

    public abstract JsonAutoDetect.Visibility fieldVisibility

  Minimum visibility required for auto-detecting member fields.

  Default:
    com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.DEFAULT

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2012 FasterXML. All Rights Reserved.