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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -