java - Types annotation that holds string array values -
interface:
public @interface types { string[] value(); } declaration:
@types(test.t1, test.t2) public class test{ public static final string t1= "das"; public static final string t2= "abc"; } how can class attributes in types interface correctly?
you forgot curly braces:
public @interface types { string[] value(); } @types({test.t1, test.t2}) // <- requires {} here because multiple values passed public class test{ public static final string t1= "das"; public static final string t2= "abc"; }
Comments
Post a Comment