It is a compile-time error if the return type of a method declared in an annotation type is any type other than one of the following: one of the primitive types, String, Class and any invocation of Class, an enum type (§8.9), an annotation type, or an array (§10) of one of the preceding types. It is also a compile-time error if any method declared in an annotation type has a signature that is override-equivalent to that of any public or protected method declared in class Object or in the interface annotation.Annotation.
And then it says this under "Discussion":
Note that this does not conflict with the prohibition on generic methods, as wildcards eliminate the need for an explicit type parameter.
In other words, it suggests using wildcards instead of type parameters. Probably allowing type parameters would have made annotations a lot more complicated, so they were just left out of annotations, with the idea that wildcards should be enough for what you'd need.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Annotation attributes with type parameters