]> source.dussan.org Git - aspectj.git/commitdiff
useful class i keep rewriting!
authoraclement <aclement>
Tue, 18 Dec 2007 08:49:38 +0000 (08:49 +0000)
committeraclement <aclement>
Tue, 18 Dec 2007 08:49:38 +0000 (08:49 +0000)
bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ClassPrinter.java [new file with mode: 0644]

diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ClassPrinter.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ClassPrinter.java
new file mode 100644 (file)
index 0000000..2efd1ae
--- /dev/null
@@ -0,0 +1,21 @@
+package org.aspectj.apache.bcel.classfile.tests;
+
+import java.io.File;
+
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.util.ClassPath;
+import org.aspectj.apache.bcel.util.SyntheticRepository;
+
+public class ClassPrinter extends BcelTestCase {
+
+       public static void main(String[] args) throws ClassNotFoundException {
+               new ClassPrinter().run(args);
+       }
+       
+       public void run(String[] args) throws ClassNotFoundException {
+               ClassPath cp = new ClassPath(args[0]+File.pathSeparator+System.getProperty("java.class.path"));
+               SyntheticRepository sr =  SyntheticRepository.getInstance(cp);
+               JavaClass clazz = sr.loadClass(args[1]);
+               System.err.println(clazz.toString());
+       }
+}