I am having an issue when checking parameterized types of a parameter. I am using method.getGenericParameterTypes()
and casting it to ParameterizedType
simply to check if the parameter is the correct Map
however when I check the types I get String, ?
instead of String, Object
, for the string it's easy to check with String.class.equals(type[0])
however for ?
doing Object.class.equals(type[1])
will return false. Is there a better way to check if the parameterized type is Object
?
mercredi 11 novembre 2020
Reflection check if parametized type is String and Obeject
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire