summaryrefslogtreecommitdiffstats
path: root/bcel-builder/testsrc/org
diff options
context:
space:
mode:
Diffstat (limited to 'bcel-builder/testsrc/org')
-rw-r--r--bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ClassPrinter.java21
1 files changed, 21 insertions, 0 deletions
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
index 000000000..2efd1ae44
--- /dev/null
+++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ClassPrinter.java
@@ -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());
+ }
+}