Examples of visitTypeInsn()


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

       
      String listenclass = (String) gc.ctx.get("listenClass");
      if (listenclass != null) {
          //this.eventListener = new MyListener()
            mv.visitVarInsn(ALOAD, 0);
            mv.visitTypeInsn(NEW, getJVMClassName(listenclass));
            mv.visitInsn(DUP);
            mv.visitMethodInsn(INVOKESPECIAL, getJVMClassName(listenclass),
                "<init>", "()V");
            mv.visitFieldInsn(PUTFIELD, gc.xHomeJCN, LISTENER_FIELD,
              getJVMType(listenclass));
View Full Code Here

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

        }

        // GENERATE helper = new ExceptionHelper(this, target, source, lineNumber)
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);

        methodVisitor.visitTypeInsn(Opcodes.NEW, helperType.getInternalName());
        methodVisitor.visitInsn(Opcodes.DUP);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 1);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 2);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 3);
View Full Code Here

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

        MethodVisitor mv = controller.getMethodVisitor();

        statement.getExpression().visit(controller.getAcg());

        // we should infer the type of the exception from the expression
        mv.visitTypeInsn(CHECKCAST, "java/lang/Throwable");
        mv.visitInsn(ATHROW);
       
        controller.getOperandStack().remove(1);
    }
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter.visitTypeInsn()

    AnalyzerAdapter aa = new AnalyzerAdapter("C", ACC_PUBLIC, "m",
        "(Ljava/lang/Integer;)I", rc);
    rc.aa = aa;
    aa.visitCode();
    aa.visitVarInsn(ALOAD, 1);
    aa.visitTypeInsn(CHECKCAST, "java/lang/Number");
    aa.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Number", "intValue",
        "()I");
    aa.visitInsn(IRETURN);
    aa.visitMaxs(1, 2);
    aa.visitEnd();
View Full Code Here

Examples of org.objectweb.asm.commons.GeneratorAdapter.visitTypeInsn()

    mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
    mv.visitJumpInsn( Opcodes.IFNONNULL, l_0 );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "java/math/BigDecimal", "ZERO", "Ljava/math/BigDecimal;" );
    mv.visitJumpInsn( Opcodes.GOTO, l_1 );
    mv.visitLabel( l_0 );
    mv.visitTypeInsn( Opcodes.NEW, "java/math/BigDecimal" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "java/math/BigDecimal", "<init>", "(Ljava/math/BigInteger;)V" );
    mv.visitLabel( l_1 );
    compileValueAdjustment();
View Full Code Here

Examples of org.objectweb.asm.tree.MethodNode.visitTypeInsn()

    mn.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
    Label end = new Label();
    mn.visitJumpInsn(GOTO, end);
    mn.visitLabel(label);
    mn.visitFrame(F_SAME, 0, null, 0, null);
    mn.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
    mn.visitInsn(DUP);
    mn.visitMethodInsn(INVOKESPECIAL,
        "java/lang/IllegalArgumentException", "<init>", "()V");
    mn.visitInsn(ATHROW);
    mn.visitLabel(end);
View Full Code Here

Examples of org.objectweb.asm.util.TraceMethodVisitor.visitTypeInsn()

    mv.visitVarInsn(ILOAD, 1);
    mv.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
    mv.visitInsn(RETURN);
    mv.visitLabel(label);
    mv.visitFrame(F_SAME, 0, null, 0, null);
    mv.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
    mv.visitInsn(DUP);
    mv.visitMethodInsn(INVOKESPECIAL,
        "java/lang/IllegalArgumentException", "<init>", "()V");
    mv.visitInsn(ATHROW);
    mv.visitLabel(new Label());
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitTypeInsn()

        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_DEPRECATED, "m", "()V", null, null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "pkg/Outer$1");
        mv.visitInsn(DUP);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL,
                "pkg/Outer$1",
                "<init>",
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitTypeInsn()

                "toString",
                "()Ljava/lang/String;",
                null,
                null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
        mv.visitInsn(DUP);
        mv.visitMethodInsn(INVOKESPECIAL,
                "java/lang/StringBuilder",
                "<init>",
                "()V");
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitTypeInsn()

    public void testIllegalTypeInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTypeInsn(NEW, "[I");
            fail();
        } catch (Exception e) {
        }
    }
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.