First, we define a wrapper annotation which holds an array of the actual annotations:
Variant 2: Using repeatable annotations (new school)
Using variant 2 the java compiler implicitly sets up the @Hints
annotation under the hood. That’s important for reading annotation information via reflection.
Furthermore the usage of annotations in Java 8 is expanded to two new targets: