jeudi 21 juillet 2016

using generic class as a list

I want to declare List<clz> in the following code snippet. But it says clz cannot be resolved to a type. Any idea why? I'm new to java reflections.

Method method = user.getClass().getMethod(outerGetter);
Class<?> clz = method.getReturnType();
List<Class<?>> outerValues = (List<Class<?>>)ReflectionUtils.get(user, outerGetter);

Any help is appreciated, thanks!





Aucun commentaire:

Enregistrer un commentaire