Adding recursive call to the getResolvedClassInfo() method: look into the parent...
[jpf-core.git] / examples / Reflection.java
index cc13e07e069be7a9237ace41e186d4a6eee041d8..9502a04564bb056d6b4c9950f7f0805a63eb1030 100644 (file)
@@ -9,6 +9,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 
 import java.math.BigInteger;
+import java.security.ProtectionDomain;
 
 public class Reflection {
 
@@ -79,8 +80,9 @@ public class Reflection {
       Type returnType = method.getGenericReturnType();
          Class.class.getSimpleName();*/
       //System.out.println(returnType);
-      BigInteger bi = new BigInteger("-1");
-         System.out.println(bi);
+         
+      //BigInteger bi = new BigInteger("-1");
+         //System.out.println(bi);
          
         /* TODO: This is an excerpt of the BigInteger library
                int radix = 10;
@@ -178,7 +180,7 @@ public class Reflection {
       System.out.println(returnType);*/
       
       /* TODO: Enumerate all methods in Class.class */
-      Method[] methods = Class.class.getMethods();
+      /*Method[] methods = Class.class.getMethods();
       for(Method mth : methods) {
                  System.out.println("===========================");
          System.out.println("Method: " + mth.getName());
@@ -189,7 +191,7 @@ public class Reflection {
                  System.out.println();
                  Type returnType = mth.getGenericReturnType();
                  System.out.println(returnType + "\n");
-      }
+      }*/
 
       /*Class[] parameterTypes = methods[0].getParameterTypes();
       for(Class parameterType: parameterTypes){
@@ -210,6 +212,9 @@ public class Reflection {
           System.out.println(bound);
       }
       System.out.println();*/
+         
+         ProtectionDomain pd = Class.class.getProtectionDomain();
+      System.out.println(pd);
    }
 }