]> source.dussan.org Git - aspectj.git/commitdiff
464749: Fix, remove Play class
authorAndy Clement <aclement@gopivotal.com>
Mon, 20 Apr 2015 16:18:50 +0000 (09:18 -0700)
committerAndy Clement <aclement@gopivotal.com>
Mon, 20 Apr 2015 16:18:50 +0000 (09:18 -0700)
bcel-builder/testsrc/Play.java [deleted file]
lib/bcel/bcel-src.zip
lib/bcel/bcel-verifier.jar
lib/bcel/bcel.jar

diff --git a/bcel-builder/testsrc/Play.java b/bcel-builder/testsrc/Play.java
deleted file mode 100644 (file)
index 024ef7a..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-import java.io.File;
-import java.io.FileInputStream;
-
-import org.aspectj.apache.bcel.classfile.Attribute;
-import org.aspectj.apache.bcel.classfile.ClassParser;
-import org.aspectj.apache.bcel.classfile.Field;
-import org.aspectj.apache.bcel.classfile.JavaClass;
-import org.aspectj.apache.bcel.classfile.Method;
-import org.aspectj.apache.bcel.classfile.Unknown;
-
-
-public class Play {
-       
-       public static void printBytes(byte[] bs) {
-               StringBuilder sb = new StringBuilder("Bytes:"+bs.length+"[");
-               for (int i=0;i<bs.length;i++) {
-                       if (i>0) sb.append(" ");
-                       sb.append(bs[i]);
-               }
-               sb.append("]");
-               System.out.println(sb);
-       }
-       
-       public static void main(String[] args) throws Exception {
-               if (args==null || args.length==0 ) {
-                       System.out.println("Specify a file");
-                       return;
-               }
-               if (!args[0].endsWith(".class")) {
-                       args[0] = args[0]+".class";
-               }
-               FileInputStream fis = new FileInputStream(new File(args[0]));
-               ClassParser cp = new ClassParser(fis,args[0]);
-               JavaClass jc = cp.parse();
-               Attribute[] attributes = jc.getAttributes();
-               printUsefulAttributes(attributes);
-               System.out.println("Fields");
-               Field[] fs = jc.getFields();
-               if (fs!=null) {
-                       for (Field f: fs) {
-                               System.out.println(f);
-                               printUsefulAttributes(f.getAttributes());
-                       }
-               }
-               System.out.println("Methods");
-               Method[] ms = jc.getMethods();
-               if (ms!=null) {
-                       for (Method m: ms) {
-                               System.out.println(m);
-                               printUsefulAttributes(m.getAttributes());
-                               System.out.println("Code attributes:");
-                               printUsefulAttributes(m.getCode().getAttributes());
-                       }
-               }
-//             Method[] ms = jc.getMethods();
-//             for (Method m: ms) {
-//                     System.out.println("==========");
-//                     System.out.println("Method: "+m.getName()+" modifiers=0x"+Integer.toHexString(m.getModifiers()));
-//                     Attribute[] as = m.getAttributes();
-//                     for (Attribute a: as) {
-//                             if (a.getName().toLowerCase().contains("synthetic")) {
-//                                     System.out.println("> "+a.getName());
-//                             }
-//                     }
-//             }
-       }
-
-       private static void printUsefulAttributes(Attribute[] attributes) {
-               for (Attribute attribute: attributes) {
-                       String n = attribute.getName();
-                       if (n.equals("RuntimeInvisibleTypeAnnotations") ||
-                               n.equals("RuntimeVisibleTypeAnnotations")) {
-                               Unknown unknown = (Unknown)attribute;
-                               byte[] bs = unknown.getBytes();
-                               printBytes(bs);
-                       }
-               }
-       }
-}
index 14f9c2f0aa12b49869bfd6d74822a0ed7b9c6b5d..0134491e0e976687ad836549aee5a0dc1b05b402 100644 (file)
Binary files a/lib/bcel/bcel-src.zip and b/lib/bcel/bcel-src.zip differ
index ffeb0791fc2853e78bf29c889eaa97b8993492bc..7a722a9057b89f4226d58732765bd5a206db4087 100644 (file)
Binary files a/lib/bcel/bcel-verifier.jar and b/lib/bcel/bcel-verifier.jar differ
index 9b0bce336aee5748bba2d02c077e2cde42033edd..70652a4703905fe0a33077bce8d37f5dcba2f8ec 100644 (file)
Binary files a/lib/bcel/bcel.jar and b/lib/bcel/bcel.jar differ