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