for (int i = 0; i < parameters.length; i++) {
System.out.println(parameters[i]);
}
- System.out.println();*/
+ System.out.println();
+ Type returnType = method.getGenericReturnType();
+ System.out.println(returnType);*/
+
/*Type superCls = Generic.class.getGenericSuperclass();
//Type superCls = String.class.getGenericSuperclass();
System.out.println(superCls);
System.out.println(interfaces[i]);
}*/
+
Method[] methods = Class.class.getMethods();
Method method = null;
for(Method mth : methods) {
- //if (mth.getName().equals("getConstructor")) {
+ if (mth.getName().equals("getConstructor")) {
//if (mth.getName().equals("isAssignableFrom")) {
- if (mth.getName().equals("getTypeParameters")) {
+ //if (mth.getName().equals("getSuperclass")) {
method = mth;
}
}
System.out.println(parameters[i]);
}
System.out.println();
+ Type returnType = method.getGenericReturnType();
+ System.out.println(returnType);
+
+
/*Class[] parameterTypes = methods[0].getParameterTypes();
for(Class parameterType: parameterTypes){
System.out.println(parameterType.getName());
System.out.println(bound);
}
System.out.println();*/
- Type returnType = method.getGenericReturnType();
- System.out.println(returnType);
-
+
}
}