J’ai déclaré une annotation comme ceci:
public @interface CustomAnnot { Ssortingng[] author() default "me"; Ssortingng description() default ""; }
Une annotation valide serait donc
@CustomAnnot(author="author1", description="test")
Ce que je n’arrive pas à comprendre, c’est comment définir plusieurs auteurs, puisque author () a retourné Ssortingng [], cela devrait être possible.
@CustomAnnot(author="author1","autor2", description="test")
ne fonctionne pas!
Fais-le comme ça:
public @interface CustomAnnot { Ssortingng[] author() default "me"; Ssortingng description() default ""; }
Et votre annotation:
@CustomAnnot(author={"author1","author2"}, description="test")