I have enum:
public enum Scope {
USER, GLOBAL;
public static final Scope[] TRANSIENT = {};
public static final Scope[] USER_OVER_GLOBAL = {GLOBAL, USER};
public static final Scope[] GLOBAL_OVER_USER = {USER, GLOBAL};
}
and annotation:
public @interface Config {
public Scope[] load() default Scope.GLOBAL_OVER_USER; // Can't use this defval
public Scope[] save() default Scope.USER;
}
Why I can't use static arrays as default values for annotation's property? My NetBeans 7.3 Beta tell me there is required Scope
but found Scope[]
- as you can see this not true. Is there a NB's or Java 7 related confusion?