Hello Groovy users
What is the right way to define this java annotation in groovy? I am
testing this out in Groovy 5.0, I have not tried 4.x.
I tried using [] after the default keyword, but I get the error
"Cannot return value of type java.util.ArrayList<#E> for method returning
java.lang.Class<?>[]" and
"Cannot return value of type java.util.ArrayList<#E> for method returning
java.lang.Class<? extends MyClazz>[]"
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAnnotation {
Class<?>[] groups() default {};
Class<? extends MyClazz>[] payloads() default {};
}
regards
Saravanan