public Class Constants {
public static final String single = "aabbcc";
public static final String[] ttt = {"aa", "bb", "cc"};
}
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER, ElementType.FIELD})
public @interface Anno {
String aaa() default "aaa"; //this is allowed.
String bbb() default Constants.single; //this is allowed.
String[] ccc() default {}; //this is also allowed.
String[] ddd() default Constants.ttt; //while this is not!
}
as the example shown above, I don't get it why String array constants are not allowed as annotation attribute value?