@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface DelegatesTo
This annotation can be used by API or DSL writers to document parameters which accept a closure. In that case, using this annotation, you can specify what the delegate type of the closure will be. This is important for IDE support.
Example:
// Document the fact that the delegate of the closure will be an ExecSpec
ExecResult exec(@DelegatesTo(ExecSpec) Closure closure) { ... }