Package org.objectweb.asm.commons

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


      Label afterCatch = staticAdapter.newLabel();
      staticAdapter.mark(endPopulate);
      staticAdapter.goTo(afterCatch);

      staticAdapter.mark(catchHandler);
      // We don't care about the exception, so pop it off
      staticAdapter.pop();
      // store the reflected method in the static field
      staticAdapter.visitInsn(ACONST_NULL);
      staticAdapter.putStatic(typeBeingWoven, methodStaticFieldName,
View Full Code Here


      staticAdapter.pop();
      // store the reflected method in the static field
      staticAdapter.visitInsn(ACONST_NULL);
      staticAdapter.putStatic(typeBeingWoven, methodStaticFieldName,
          METHOD_TYPE);
      staticAdapter.mark(afterCatch);

    }
    staticAdapter.returnValue();
    staticAdapter.endMethod();
  }
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

        final GeneratorAdapter mgen =
            new GeneratorAdapter(0, init, null, Privilizer.EMPTY_TYPE_ARRAY, this);

        mgen.visitCode();
        final Label begin = mgen.mark();

        // invoke super constructor
        mgen.loadThis();
        mgen.invokeConstructor(Type.getType(Object.class), Method.getMethod("void <init> ()"));
        // assign remaining fields
View Full Code Here

            mgen.loadArg(arg++);
            mgen.putField(action, field.name, field.type);
        }

        mgen.returnValue();
        final Label end = mgen.mark();

        // declare local vars
        mgen.visitLocalVariable("this", action.getDescriptor(), null, begin, end, 0);
        arg = 1;
        for (final Field field : fields) {
View Full Code Here

      final ExpressionNode foldedElt = _elts.get( iFoldedElt );
      final Label noMatch = mv.newLabel();
      compileCallToMatcherAndBuildItInFirstPass( _elts, _iElt );
      compileSkipFoldIfNoMatch( noMatch );
      compileElementFold( foldedElt );
      mv.mark( noMatch );
      return _iElt + this.tableDescriptor.numberOfColumns();
    }
  }

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.