JsonAutoDetect (Jackson-annotations 2.11.0 API)
Date: 2020-04-25

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, and with what minimum access level. 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.

  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)

- - ### Optional Element Summary

    Optional Elements
    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.

- - ### Element Detail

    - #### 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

Copyright © 2008–2020 FasterXML. All rights reserved.