Package org.objectweb.asm.commons

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


      ga.loadThis();
      ga.loadArg(0);
      ga.putField(bean, "f", Type.INT_TYPE);
      Label end = new Label();
      ga.goTo(end);
      ga.mark(label);
      ga.throwException(Type.getType(IllegalArgumentException.class),
          "f");
      ga.mark(end);
      ga.returnValue();
      ga.endMethod();
View Full Code Here


      Label end = new Label();
      ga.goTo(end);
      ga.mark(label);
      ga.throwException(Type.getType(IllegalArgumentException.class),
          "f");
      ga.mark(end);
      ga.returnValue();
      ga.endMethod();
    }
    cv.visitEnd();
    byte[] b = cw.toByteArray();
View Full Code Here

            ga.loadThis();
            ga.loadArgs();
            ga.invokeConstructor(superType, m);
            ga.returnValue();
            ga.mark(ok);
        }

        ga.loadThis();
        ga.getStatic(selfType, field_name, PROXY_METHOD_TYPE);
View Full Code Here

        } else {
            // box arguments
            ga.loadArgArray();
        }

        Label before = ga.mark();

        ga.invokeInterface(INVOCATION_HANDLER_TYPE,
                INVOCATION_HANDLER_INVOKE_METHOD);

        Label after = ga.mark();
View Full Code Here

        Label before = ga.mark();

        ga.invokeInterface(INVOCATION_HANDLER_TYPE,
                INVOCATION_HANDLER_INVOKE_METHOD);

        Label after = ga.mark();

        ga.unbox(m.getReturnType());
        ga.returnValue();

        // this is a simple rethrow handler
View Full Code Here

        ga.unbox(m.getReturnType());
        ga.returnValue();

        // this is a simple rethrow handler
        Label rethrow = ga.mark();
        ga.visitInsn(Opcodes.ATHROW);

        for (int i = 0; i < ex.length; i++) {
            ga.visitTryCatchBlock(before, after, rethrow, ex[i]
                    .getInternalName());
View Full Code Here

        ga.visitTryCatchBlock(before, after, rethrow, "java/lang/Error");
        ga.visitTryCatchBlock(before, after, rethrow,
                "java/lang/RuntimeException");

        Type thr = Type.getType(Throwable.class);
        Label handler = ga.mark();
        Type udt = Type.getType(UndeclaredThrowableException.class);
        int loc = ga.newLocal(thr);
        ga.storeLocal(loc, thr);
        ga.newInstance(udt);
        ga.dup();
View Full Code Here

    methodAdapter.ifNonNull(returnTrueLabel);
    // return false if we haven't jumped anywhere
    methodAdapter.push(false);
    methodAdapter.returnValue();
    // mark the returnTrueLable
    methodAdapter.mark(returnTrueLabel);
    methodAdapter.push(true);
    methodAdapter.returnValue();
    // end the method
    methodAdapter.endMethod();
View Full Code Here

    methodAdapter.dup();
    methodAdapter.push("The dispatcher must never be null!");
    methodAdapter.invokeConstructor(NPE_TYPE, NPE_CONSTRUCTOR);
    methodAdapter.throwException();
   
    methodAdapter.mark(returnValue);
    methodAdapter.returnValue();
    methodAdapter.endMethod();
    //////////////////////////////////////////////////////////
  }
View Full Code Here

      Label endPopulate = staticAdapter.newLabel();
      Label catchHandler = staticAdapter.newLabel();
      staticAdapter.visitTryCatchBlock(beginPopulate, endPopulate,
          catchHandler, THROWABLE_INAME);

      staticAdapter.mark(beginPopulate);
      staticAdapter.push(m.declaringClass);

      // push the method name string arg onto the stack
      staticAdapter.push(m.method.getName());
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.