Annotation Interface ParameterAnnotation.ClosureHint

Enclosing class:
ParameterAnnotation

@Target({FIELD,METHOD}) @Retention(CLASS) public static @interface ParameterAnnotation.ClosureHint

Allows a DelegatesTo and or ClosureParams annotation to be placed on the element parameter for adder methods (in case of collection or map only on the single adder methods).


 @DSL class Foo {

   @ParameterAnnotation.ClosureHint(delegatesTo=@DelegatesTo(Foo))
   String field
 }
 
Will have the setter method generated as follows:

 String field(@DelegatesTo(Foo) String value)
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    groovy.lang.DelegatesTo
     
    groovy.transform.stc.ClosureParams
     
  • Element Details

    • delegate

      groovy.lang.DelegatesTo delegate
      Default:
      @groovy.lang.DelegatesTo
    • params

      groovy.transform.stc.ClosureParams params
      Default:
      @groovy.transform.stc.ClosureParams(groovy.transform.stc.SimpleType.class)