I\'m trying to write a simple validation lib with annotations that use the new TYPE_USE target from Java 8. The way to access these things is really complex, and left me wit
You said:
@First("array") List<@First("string") String> @First("list") [] arrayOfListOfString;
Works fine (the annotations are matched with the corresponding types).
This looks wrong to me. A type such as
@English String @NonEmpty []
is read as "non-empty array of English strings".
Now let's consider your example (which I have simplified slightly):
@First("array") List @First("list") [] arrayOfList;
You have a @First("list") array, where each element is a @First("array") List. Is that what you want? It's not what is implied by the names.
I don't know what is wrong with your code in the listOfArrayOfInteger
case, but you might want to revisit your claim "The code seems to work in every other scenario" given that the one example that you gave seems to be incorrect.