Changing StringBuilder into HashMap and HashSet.
[jpf-core.git] / examples / Reflection.java
index 0918964c6fa547d29581b8c8518cffba5e5eefc9..801940e9e7e2c54e79b087ecd138e738bbff9046 100644 (file)
@@ -12,6 +12,8 @@ import java.util.Collection;
 import java.math.BigInteger;
 import java.security.ProtectionDomain;
 
+import java.beans.Introspector;
+
 public class Reflection {
 
     interface GenericSuperShort<XYZ> {
@@ -52,12 +54,24 @@ public class Reflection {
           }*/
        }
 
-   public static void main(String[] args) {
+   public static void main(String[] args) throws Exception {
           
          //BigInteger bi = new BigInteger("-1");
          //System.out.println(bi);
+         /*StringBuilder sb = new StringBuilder(0);
+         sb.append('[');
+         sb.append(']');
+         System.out.println(sb.toString());*/
+         
+         //Class cls = Class.forName("groovy.runtime.metaclass.Logger.LoggerMetaClass");
+         //Class cls2 = Class.forName("groovy.runtime.metaclass.[Ljava.lang.Object;MetaClass");
+         //Class cls2 = Class.forName("[Ljava.lang.Object;BeanInfo");
+         Class cls = Object[].class;
+         System.out.println("Bean introspection do not ignore bean info: " + cls.getSimpleName());
+         System.out.println("Bean introspection do not ignore bean info: " + cls.getName());
+      Object obj = Introspector.getBeanInfo(cls);
           
-         /* TODO: Enumerate all methods in Class.class */ 
+         /* TODO: Enumerate all methods in Class.class
       Method[] methods = Collection.class.getMethods();
       for(Method mth : methods) {
                  System.out.println("===========================");
@@ -69,7 +83,7 @@ public class Reflection {
                  System.out.println();
                  Type returnType = mth.getGenericReturnType();
                  System.out.println(returnType + "\n");
-      }
+      }*/
 
       /*Method[] methods = Collection.class.getMethods();
       //  Method[] methods = Class.class.getMethods();