lundi 14 décembre 2015

GenericTypeResolver.resolveTypeArguments returns null

I have the following code:

List strings = new ArrayList<String>();
strings.add("string");
System.out.println(GenericTypeResolver.resolveTypeArguments(String.class, strings.getClass()));

It prints null.

I cannot understand this method signature.

I want to check that strings is parameterized with String.

How do you use resolveTypeArguments properly ?

P.S.

My example just dummy.





Aucun commentaire:

Enregistrer un commentaire