Cleaning up a bit Reflection.java.
authorRahmadi Trimananda <rtrimana@uci.edu>
Sat, 29 Jun 2019 23:35:38 +0000 (16:35 -0700)
committerRahmadi Trimananda <rtrimana@uci.edu>
Sat, 29 Jun 2019 23:35:38 +0000 (16:35 -0700)
examples/Reflection.java

index ac036c2..312248f 100644 (file)
@@ -75,24 +75,16 @@ public class Reflection {
       //  Method[] methods = Class.class.getMethods();
         Method method = null;
         for(Method meth : methods) {
-                               System.out.println("===========================");
-                               //System.out.println("Method: " + meth.toString());
-                               Type[] parameters = meth.getGenericParameterTypes();
-                               for (int i = 0; i < parameters.length; i++) {
-                                       System.out.println(parameters[i]);
-                               }
-                               Type returnType = meth.getGenericReturnType();
-                               System.out.println(returnType);
-                               System.out.println("===========================");
+                       System.out.println("===========================");
+                       //System.out.println("Method: " + meth.toString());
+                       Type[] parameters = meth.getGenericParameterTypes();
+                       for (int i = 0; i < parameters.length; i++) {
+                               System.out.println(parameters[i]);
+                       }
+                       Type returnType = meth.getGenericReturnType();
+                       System.out.println(returnType);
+                       System.out.println("===========================");
         }
-        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();
-      Type returnType = method.getGenericReturnType();
-      System.out.println(returnType);
          
         /* TODO: This is an excerpt of the BigInteger library
                int radix = 10;