Fixing another bug: The java.lang.StringBuilder.append(char c) needs to consider...
[jpf-core.git] / examples / Reflection.java
index 312248fae527671f1f97bf6120965501d78ca650..e48689033dcff6b4f426824afdd9c6eee482ad3a 100644 (file)
@@ -54,13 +54,17 @@ public class Reflection {
 
    public static void main(String[] args) {
           
-         BigInteger bi = new BigInteger("-1");
-         System.out.println(bi);
+         //BigInteger bi = new BigInteger("-1");
+         //System.out.println(bi);
+         StringBuilder sb = new StringBuilder(0);
+         sb.append('[');
+         sb.append(']');
+         System.out.println(sb.toString());
           
-         /* TODO: Enumerate all methods in Class.class 
-      Method[] methods = Class.class.getMethods();
+         /* TODO: Enumerate all methods in Class.class
+      Method[] methods = Collection.class.getMethods();
       for(Method mth : methods) {
-                 //System.out.println("===========================");
+                 System.out.println("===========================");
          //System.out.println("Method: " + mth.getName());
                  Type[] parameters = mth.getGenericParameterTypes();
                  for (int i = 0; i < parameters.length; i++) {
@@ -71,7 +75,7 @@ public class Reflection {
                  System.out.println(returnType + "\n");
       }*/
 
-      Method[] methods = Collection.class.getMethods();
+      /*Method[] methods = Collection.class.getMethods();
       //  Method[] methods = Class.class.getMethods();
         Method method = null;
         for(Method meth : methods) {
@@ -84,7 +88,7 @@ public class Reflection {
                        Type returnType = meth.getGenericReturnType();
                        System.out.println(returnType);
                        System.out.println("===========================");
-        }
+        }*/
          
         /* TODO: This is an excerpt of the BigInteger library
                int radix = 10;
@@ -162,11 +166,11 @@ public class Reflection {
             System.out.println(interfaces[i]);
         }*/
       
-      /*
-         Method[] methods = Collection.class.getMethods();
+      
+         /*Method[] methods = Map.class.getMethods();
          Method method = null;
       for(Method mth : methods) {
-        if (mth.getName().equals("toArray")) {
+        if (mth.getName().equals("putAll")) {
         //if (mth.getName().equals("isAssignableFrom")) {
         //if (mth.getName().equals("getSuperclass")) {
            method = mth;