Adding ParameterizedTypeImpl to getGenericSuperclass method.
[jpf-core.git] / examples / Reflection.java
index 538bcd1dc3aa54f1ac3c8ab453bf0ae2c816fb29..d8f6e44a742d498236b5627405e938167caab8cc 100644 (file)
@@ -12,7 +12,7 @@ public class Reflection {
        class GenericShort<TUVW,ABCD> {
        }
 
-       class Generic<TUVW,ABCD,KLM,NOP> {
+       class Generic<TUVW,ABCD,KLM,NOP> extends GenericShort<TUVW,ABCD> {
        
        }
 
@@ -42,7 +42,7 @@ public class Reflection {
 
    public static void main(String[] args) {
 
-      Method[] methods = SampleClass.class.getMethods();
+      /*Method[] methods = SampleClass.class.getMethods();
       //  Method[] methods = Class.class.getMethods();
         Method method = null;
         for(Method meth : methods) {
@@ -55,7 +55,10 @@ public class Reflection {
       for (int i = 0; i < parameters.length; i++) {
          System.out.println(parameters[i]);
       }
-      System.out.println();
+      System.out.println();*/
+      Type superCls = Generic.class.getGenericSuperclass();
+      //Type superCls = String.class.getGenericSuperclass();
+      System.out.println(superCls);
       /*Class[] parameterTypes = methods[0].getParameterTypes();
       for(Class parameterType: parameterTypes){
          System.out.println(parameterType.getName());