Package org.objectweb.asm.commons

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


      {
        GeneratorAdapter ga = new GeneratorAdapter(ACC_PUBLIC,
                org.objectweb.asm.commons.Method.getMethod("Object call(Object[])"), null,
                new Type[] { Type.getType(GuardException.class)}, cw);
        if (guard) {
          ga.visitVarInsn(ALOAD, 0);
          ga.visitVarInsn(ALOAD, 1);
          ga.invokeVirtual(Type.getType(IndyWrapper.class),
                  org.objectweb.asm.commons.Method.getMethod("void guardCall(Object[])"));
        }
        ga.visitVarInsn(ALOAD, 0);
View Full Code Here


        GeneratorAdapter ga = new GeneratorAdapter(ACC_PUBLIC,
                org.objectweb.asm.commons.Method.getMethod("Object call(Object[])"), null,
                new Type[] { Type.getType(GuardException.class)}, cw);
        if (guard) {
          ga.visitVarInsn(ALOAD, 0);
          ga.visitVarInsn(ALOAD, 1);
          ga.invokeVirtual(Type.getType(IndyWrapper.class),
                  org.objectweb.asm.commons.Method.getMethod("void guardCall(Object[])"));
        }
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 1);
View Full Code Here

          ga.visitVarInsn(ALOAD, 0);
          ga.visitVarInsn(ALOAD, 1);
          ga.invokeVirtual(Type.getType(IndyWrapper.class),
                  org.objectweb.asm.commons.Method.getMethod("void guardCall(Object[])"));
        }
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 1);
        ga.invokeVirtual(Type.getType(IndyWrapper.class),
                org.objectweb.asm.commons.Method.getMethod("Object unwrap(Object[])"));
        ga.visitVarInsn(ASTORE, 2);
        ga.visitVarInsn(ALOAD, 2);
View Full Code Here

          ga.visitVarInsn(ALOAD, 1);
          ga.invokeVirtual(Type.getType(IndyWrapper.class),
                  org.objectweb.asm.commons.Method.getMethod("void guardCall(Object[])"));
        }
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 1);
        ga.invokeVirtual(Type.getType(IndyWrapper.class),
                org.objectweb.asm.commons.Method.getMethod("Object unwrap(Object[])"));
        ga.visitVarInsn(ASTORE, 2);
        ga.visitVarInsn(ALOAD, 2);
        Label l0 = new Label();
View Full Code Here

        }
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 1);
        ga.invokeVirtual(Type.getType(IndyWrapper.class),
                org.objectweb.asm.commons.Method.getMethod("Object unwrap(Object[])"));
        ga.visitVarInsn(ASTORE, 2);
        ga.visitVarInsn(ALOAD, 2);
        Label l0 = new Label();
        ga.ifNonNull(l0);
        ga.visitInsn(ACONST_NULL);
        ga.returnValue();
View Full Code Here

        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 1);
        ga.invokeVirtual(Type.getType(IndyWrapper.class),
                org.objectweb.asm.commons.Method.getMethod("Object unwrap(Object[])"));
        ga.visitVarInsn(ASTORE, 2);
        ga.visitVarInsn(ALOAD, 2);
        Label l0 = new Label();
        ga.ifNonNull(l0);
        ga.visitInsn(ACONST_NULL);
        ga.returnValue();
        ga.visitLabel(l0);
View Full Code Here

        Label l0 = new Label();
        ga.ifNonNull(l0);
        ga.visitInsn(ACONST_NULL);
        ga.returnValue();
        ga.visitLabel(l0);
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 2);
        ga.invokeDynamic("bootstrap", METHOD_SIGNATURE, BOOTSTRAP_METHOD);
        ga.returnValue();
        ga.endMethod();
      }
View Full Code Here

        ga.ifNonNull(l0);
        ga.visitInsn(ACONST_NULL);
        ga.returnValue();
        ga.visitLabel(l0);
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 2);
        ga.invokeDynamic("bootstrap", METHOD_SIGNATURE, BOOTSTRAP_METHOD);
        ga.returnValue();
        ga.endMethod();
      }
      cw.visitEnd();
View Full Code Here

        Label l2 = new Label();

        mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable");

        // Access the flag from the outer class
        mv.visitVarInsn(ALOAD, 0);
        mv.visitFieldInsn(GETFIELD, m_name, "this$0", "L" + m_outer + ";");
        mv.visitFieldInsn(GETFIELD, m_outer, getMethodFlagName(name, desc), "Z");
        mv.visitJumpInsn(IFNE, l0);

        mv.visitVarInsn(ALOAD, 0);
View Full Code Here

        mv.visitVarInsn(ALOAD, 0);
        mv.visitFieldInsn(GETFIELD, m_name, "this$0", "L" + m_outer + ";");
        mv.visitFieldInsn(GETFIELD, m_outer, getMethodFlagName(name, desc), "Z");
        mv.visitJumpInsn(IFNE, l0);

        mv.visitVarInsn(ALOAD, 0);
        mv.loadArgs();
        mv.visitMethodInsn(INVOKESPECIAL, m_name, ClassManipulator.PREFIX + name, desc, false);
        mv.visitInsn(returnType.getOpcode(IRETURN));

        // end of the non intercepted method invocation.
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.