Jackson JSON Processor
  1. Jackson JSON Processor
  2. JACKSON-760

Allow use of annotations on parameter of setter method, not just on method itself

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Currently annotations for all methods, including setters, must be attached to method itself.
      This works fine for existing use cases, but there are extensions where this would not work:

      • If we allow multi-argument setters, one may need to customize parameters differently: and specifically @JacksonInject must be added to parameter
      • There may be other integration cases where configuration of both return type and argument type(s) is needed: if so, return type can only be annotated via method, so annotations for arguments/parameters can not be attached to method.

        Activity

        Hide
        Tatu Saloranta added a comment -

        Hmmh. Doing this is actually quite a bit of work, since annotations are currently only collected for @JsonCreator accessors (static methods, constructors). So since there is no immediate need, will leave open but not work on it for 2.0 until there is specific requirement.

        Show
        Tatu Saloranta added a comment - Hmmh. Doing this is actually quite a bit of work, since annotations are currently only collected for @JsonCreator accessors (static methods, constructors). So since there is no immediate need, will leave open but not work on it for 2.0 until there is specific requirement.
        Hide
        Tatu Saloranta added a comment -

        Will close for now, as there are no immediate plans: recreate at Github issue tracker if need be.

        Show
        Tatu Saloranta added a comment - Will close for now, as there are no immediate plans: recreate at Github issue tracker if need be.

          People

          • Assignee:
            Tatu Saloranta
            Reporter:
            Tatu Saloranta
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: