System.out.println(interfaces[i]);
}*/
- Method[] methods = SampleClass.class.getMethods();
- Method method = null;
- for(Method mth : methods) {
- if (mth.getName().equals("setSampleField")) {
- method = mth;
- }
+ Method[] methods = Class.class.getMethods();
+ Method method = null;
+ for(Method mth : methods) {
+ //if (mth.getName().equals("getConstructor")) {
+ if (mth.getName().equals("isAssignableFrom")) {
+ method = mth;
}
+ }
Type[] parameters = method.getGenericParameterTypes();
//Type[] parameters = methods[0].getGenericParameterTypes();
for (int i = 0; i < parameters.length; i++) {