DelegatesTo.Target (Groovy 5.0.8)

Package: groovy.lang

## [Java] Annotation Type DelegatesTo.Target

- groovy.lang.DelegatesTo.Target

-     @Documented
      @Retention(RetentionPolicy.RUNTIME)
      @Target(ElementType.PARAMETER)
      public @interface DelegatesTo.Target

  Specifies the delegate for a `@DelegatesTo` annotated parameter of the same method.

  Example:

       // Declare that the delegate of the closure will be the "spec" argument
       ExecResult exec(DelegatesTo.Target:ExecSpec spec,DelegatesTo:Closure closure) { ... }

- - ### Element Summary

    Optional Element Summary
    Type | Name and Description
    --- | ---
    `String` | `value` An identifier used to disambiguate targets when there are multiple `@DelegatesTo.Target` annotated parameters.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Element Detail

    - #### public String value

      An identifier used to disambiguate targets when there are multiple `@DelegatesTo.Target` annotated parameters.

      Default:
        ""