I have below code in order to get return type of a method:
Class<?> c = classLoader.loadClass("com.simpleTest");
Method declaredMethods = c.getDeclaredMethods("Test");
Class<?> returnType = selectedMethod.getReturnType();
sometimes my return type is instance of a collection or a map and i want to know the generic types of it. how can i obtain it?
Aucun commentaire:
Enregistrer un commentaire