vendredi 13 octobre 2017

How to identify if a java method is generic using reflection?

How do I check if getQueue() in the sample code is generic using reflection?. One way is to go through the argument types and return type and check if they are instance of TypeVariable. I'm looking for something simpler.

Class SomeClass {
 <V> Queue<V> getQueue();
}





Aucun commentaire:

Enregistrer un commentaire