DelegatesTo.Target (Groovy 5.0.6)
Description: declaration: package: groovy.lang, annotation type: DelegatesTo, annotation type: Target

Package groovy.lang

# Annotation Type DelegatesTo.Target

Enclosing class:
  DelegatesTo

@Documented @Retention(RUNTIME) @Target(PARAMETER) public static @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) { ... }

- ## Optional Element Summary

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

- ## Element Details

  - ### value

    String value
    An identifier used to disambiguate targets when there are multiple `@DelegatesTo.Target` annotated parameters.
    Default:
      ""