Package nginx.clojure.asm.util

Examples of nginx.clojure.asm.util.Printer


            MethodVisitor mv = null;
            if (name.charAt(0) == '<') {
              mv = mn = new MethodNode(access, name, desc, signature, exceptions);
            }else {
              if (db.meetTraceTargetClassMethod(className, method)) {
                Printer tp = new Textifier();
                mn = new TracableMethodNode("Orginal: " + className + "." + method,  db, access, name, desc, signature, exceptions, tp, new PrintWriter(System.out));
                mv = new TraceMethodVisitor(mn, tp);
              }else {
                mv = mn = new InstrumentMethodNode(db, access, name, desc, signature, exceptions);
              }
View Full Code Here


    protected MethodVisitor makeOutMV(MethodNode mn) {
      String[] exps = MethodDatabase.toStringArray(mn.exceptions);
      String mk = ClassEntry.key(mn.name, mn.desc);
      MethodVisitor mv = super.visitMethod(mn.access, mn.name, mn.desc, mn.signature, exps);
      if (db.meetTraceTargetClassMethod(className, mk)) {
        Printer tp = new Textifier();
        TracableMethodVisitor tmv = new TracableMethodVisitor("Waved: " + className + "." + mk,  mv, mn.access, mn.name, mn.desc, mn.signature, exps, tp, new PrintWriter(System.out));
        mv = new TraceMethodVisitor(tmv, tp);
      }
      if (db.isVerify()) {
        return new JSRInlinerAdapter(new SuspendMethodVerifyAdvice(db, className, mv, mn.access, mn.name, mn.desc), mn.access, mn.name, mn.desc, mn.signature, exps);
View Full Code Here

        return (access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_NATIVE)) == 0;
    }
   
    //for debug usage
    public static String insnToString(AbstractInsnNode insn){
        Printer printer = new Textifier();
        TraceMethodVisitor mp = new TraceMethodVisitor(printer);
        insn.accept(mp);
        StringWriter sw = new StringWriter();
        printer.print(new PrintWriter(sw));
        printer.getText().clear();
        return sw.toString();
    }
View Full Code Here

        printer.getText().clear();
        return sw.toString();
    }
   
    public static void methodToString(MethodNode mn) {
      Printer printer = new Textifier();
        TraceMethodVisitor mp = new TraceMethodVisitor(printer);
        mn.accept(mp);
        PrintWriter pw = new PrintWriter(System.out);
        printer.print(pw);
        pw.flush();
    }
View Full Code Here

TOP

Related Classes of nginx.clojure.asm.util.Printer

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.