JacksonInject (Jackson-annotations 2.10.0 API)
Date: 2019-09-25

com.fasterxml.jackson.annotation

## Annotation Type JacksonInject

-     @Target(value={ANNOTATION_TYPE,METHOD,FIELD,PARAMETER})
       @Retention(value=RUNTIME)
      public @interface JacksonInject

  Jackson-specific annotation used for indicating that value of annotated property will be "injected", i.e. set based on value configured by `ObjectMapper` (usually on per-call basis). Usually property is not deserialized from JSON, although it possible to have injected value as default and still allow optional override from JSON.

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `OptBoolean` | `useInput` Whether matching value from input (if any) is used for annotated property or not; if disabled (`OptBoolean.FALSE`), input value (if any) will be ignored; otherwise it will override injected value.
    `String` | `value` Logical id of the value to inject; if not specified (or specified as empty String), will use id based on declared type of property.

- - ### Element Detail

    - #### value

          public abstract String value

      Logical id of the value to inject; if not specified (or specified as empty String), will use id based on declared type of property.
      Returns:
        Logical id of the value to inject
      Default:
        ""

  - - #### useInput

          public abstract OptBoolean useInput

      Whether matching value from input (if any) is used for annotated property or not; if disabled (`OptBoolean.FALSE`), input value (if any) will be ignored; otherwise it will override injected value.

      Default is `OptBoolean.DEFAULT`, which translates to `OptBoolean.TRUE`: this is for backwards compatibility (2.8 and earlier always allow binding input value).

      Returns:
        `OptBoolean.TRUE` to enable use of value from input instead of injected value, if available; `OptBoolean.FALSE` if injected value will always be used regardless of input.
      Since:
        2.9
      Default:
        com.fasterxml.jackson.annotation.OptBoolean.DEFAULT

Copyright © 2008–2019 FasterXML. All rights reserved.