samedi 30 juillet 2016

Get rid of "The value for annotation attribute must be a constant expression" message

I use annotation in my code, and I try to use value which determine in run time.

I define my list as static final (lst), and I add to this list some elements.

When I use lst.get(i), I get compilation error:

The value for annotation attribute must be a constant expression

What is the solution for this issue?

Aucun commentaire:

Enregistrer un commentaire