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

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

ruby - unknown property method: 'wait' on EC2 windows server Instance -