private static String traceBytecode( byte[] classData) {
StringWriter sw = new StringWriter();
ClassReader cr = new ClassReader( classData);
// cr.accept( new TraceClassVisitor( cw, new PrintWriter( System.out)),
cr.accept( new TraceClassVisitor( null, new PrintWriter( sw)), Attributes.getDefaultAttributes(), false);
return sw.toString();
}
private Class loadClass(String className, byte[] bytecode) throws ClassNotFoundException {
return new TestClassLoader( className, bytecode).loadClass( className);