From 5effd12ae3d931843013bc356704fa1ce11ff168 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 18 Dec 2007 08:49:38 +0000 Subject: [PATCH] useful class i keep rewriting! --- .../bcel/classfile/tests/ClassPrinter.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ClassPrinter.java 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()); + } +} -- 2.39.5