Examples of visitTryCatchBlock()


Examples of org.deuce.objectweb.asm.MethodVisitor.visitTryCatchBlock()

      mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, new String[] { Names.RMIException });
      mv.visitCode();
      Label l0 = new Label();
      Label l1 = new Label();
      Label l2 = new Label();
      mv.visitTryCatchBlock(l0, l1, l2, Names.RMIException);
      Label l3 = new Label();
      Label l4 = new Label();
      Label l5 = new Label();
      mv.visitTryCatchBlock(l3, l4, l5, Names.Exception);
      Label l6 = new Label();
View Full Code Here

Examples of org.glassfish.hk2.external.org.objectweb.asm.MethodVisitor.visitTryCatchBlock()

                    "(Ljava/lang/String;)Ljava/lang/Class;", null, null);
            mv.visitCode();
            Label l0 = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2,
                    "java/lang/ClassNotFoundException");
            mv.visitLabel(l0);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName",
                    "(Ljava/lang/String;)Ljava/lang/Class;");
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor.visitTryCatchBlock()

          c.visitMethodInsn(INVOKEVIRTUAL, "java/lang/ClassNotFoundException",
            "getMessage", "()Ljava/lang/String;");
          c.visitMethodInsn(INVOKESPECIAL, "java/lang/NoClassDefFoundError",
            "<init>", "(Ljava/lang/String;)V");
          c.visitInsn(ATHROW);
          c.visitTryCatchBlock(l0, l1, l2, "java/lang/ClassNotFoundException");
          c.visitMaxs(0, 0);
        }
        if (!classFieldfound) {
                classFieldfound = true;
          logger.log(BasicLevel.DEBUG, "Adding static field '"
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor.visitTryCatchBlock()

            cv.visitVarInsn(ALOAD, 2);
            cv.visitMethodInsn(INVOKESPECIAL,
                personality.getUserRuntimeExceptionClassNameSlash(),
                    "<init>", "(Ljava/lang/String;Ljava/lang/Throwable;)V");
            cv.visitInsn(ATHROW);
            cv.visitTryCatchBlock(l0, l1, l2, "java/lang/Exception");
        }
        cv.visitMaxs(0, 0);
    }
    private void generateGetVersioningStrategy(HomeContext gc) {
        CodeVisitor cv = gc.cv.visitMethod(ACC_PUBLIC + ACC_FINAL,
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor.visitTryCatchBlock()

        cv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/ClassNotFoundException",
                "getMessage", "()Ljava/lang/String;");
        cv.visitMethodInsn(INVOKESPECIAL, "java/lang/NoClassDefFoundError",
                "<init>", "(Ljava/lang/String;)V");
        cv.visitInsn(ATHROW);
        cv.visitTryCatchBlock(labelTry, labelEndTry, labelCatch, "java/lang/ClassNotFoundException");
        cv.visitMaxs(0, 0);
    }
    protected void generateNoArgConstructor(HomeContext gc) {
        CodeVisitor mv = gc.cv.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitVarInsn(ALOAD, 0);
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTryCatchBlock()

        mv.visitLabel(tryEnd);
        final Label catchStart = new Label();
        mv.visitLabel(catchStart);
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, "org/codehaus/groovy/runtime/ScriptBytecodeAdapter", "unwrap", "(Lgroovy/lang/GroovyRuntimeException;)Ljava/lang/Throwable;");
        mv.visitInsn(Opcodes.ATHROW);       
        mv.visitTryCatchBlock(tryStart, tryEnd, catchStart, GRE);
       
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        return mv;
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTryCatchBlock()

            }
        }
       
        //exception table writing
        for (ExceptionTableEntry ep : typedExceptions) {
          mv.visitTryCatchBlock(ep.start, ep.end, ep.goal, ep.sig);
        }
        //exception table writing
        for (ExceptionTableEntry ep : untypedExceptions) {
          mv.visitTryCatchBlock(ep.start, ep.end, ep.goal, ep.sig);
        }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTryCatchBlock()

        for (ExceptionTableEntry ep : typedExceptions) {
          mv.visitTryCatchBlock(ep.start, ep.end, ep.goal, ep.sig);
        }
        //exception table writing
        for (ExceptionTableEntry ep : untypedExceptions) {
          mv.visitTryCatchBlock(ep.start, ep.end, ep.goal, ep.sig);
        }
       
       
        pop();
        typedExceptions.clear();
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTryCatchBlock()

  public void writeExceptionTable(BlockRecorder block, Label goal, String sig) {
      if (block.isEmpty) return;
      MethodVisitor mv = controller.getMethodVisitor();
      for (LabelRange range : block.ranges) {
          mv.visitTryCatchBlock(range.start, range.end, goal, sig);
      }
  }

//    public MethodVisitor getMethodVisitor() {
//        return mv;
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTryCatchBlock()

        mv.visitLabel(tryEnd);
        final Label catchStart = new Label();
        mv.visitLabel(catchStart);
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, "org/codehaus/groovy/runtime/ScriptBytecodeAdapter", "unwrap", "(Lgroovy/lang/GroovyRuntimeException;)Ljava/lang/Throwable;");
        mv.visitInsn(Opcodes.ATHROW);       
        mv.visitTryCatchBlock(tryStart, tryEnd, catchStart, GRE);
       
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        return mv;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.