Annotation Interface DefaultApply


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface DefaultApply
Marks a field with a closure that is automatically applied during the default phase. This uses the mechanism described in DefaultValues. Note that since this is technically a Default closure, it must check itself whether a value is already set, if it should not be overridden.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends groovy.lang.Closure<Object>>
    The closure to apply.
  • Element Details

    • value

      @TypeChecked(SKIP) Class<? extends groovy.lang.Closure<Object>> value
      The closure to apply. Delegate of the closure will be value of the field annotated with this annotation.