Package ch6.sec1

Examples of ch6.sec1.BeanGeneratorTest


  public void test() throws Exception {
    ClassWriter cw = new ClassWriter(0);
    CheckClassAdapter ca = new CheckClassAdapter(cw);
    ClassNode cn = generateBasicClass();
    ClassTransformer ct = null;
    ct = new RemoveAnnotationTransformer(ct, "Ljava/lang/Deprecated;");
    ct = new AddAnnotationTransformer(ct, "Ljava/lang/Deprecated;");
    ct.transform(cn);
    cn.accept(ca);
    checkClass(defineClass("C", cw.toByteArray()));
  }
View Full Code Here


      for (int j = 0; j < classes.size(); ++j) {
        byte[] b = (byte[]) classes.get(j);
        ClassWriter cw = new ClassWriter(0);
        ClassNode cn = new ClassNode();
        new ClassReader(b).accept(cn, 0);
        new AddTimerTransformer(null).transform(cn);
        cn.accept(cw);
        cw.toByteArray();
      }
      t = System.currentTimeMillis() - t;
      times[11] = Math.min(t, times[11]);
View Full Code Here

        ClassNode cn = new ClassNode();
        new ClassReader(b).accept(cn, 0);
        Iterator it = cn.methods.iterator();
        while (it.hasNext()) {
          MethodNode mn = (MethodNode) it.next();
          new RemoveGetFieldPutFieldTransformer(null).transform(mn);
        }
        cn.accept(cw);
        cw.toByteArray();
      }
      t = System.currentTimeMillis() - t;
View Full Code Here

TOP

Related Classes of ch6.sec1.BeanGeneratorTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.