Examples of endMethod()


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

      init.visitCode();
      init.loadThis();
      init.loadArg(0);
      init.invokeConstructor(PROXY, INIT);
      init.returnValue();
      init.endMethod();
    }

    GeneratorAdapter clinit = null;
    mv = cv.visitMethod(ACC_STATIC, CLINIT.getName(), CLINIT
        .getDescriptor(), null, null);
View Full Code Here

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

        ga.invokeInterface(HANDLER, INVOKE);
        if (m.getReturnType() != Type.VOID_TYPE) {
          ga.unbox(m.getReturnType());
        }
        ga.returnValue();
        ga.endMethod();
      }
    }

    if (clinit != null) {
      clinit.returnValue();
View Full Code Here

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

        generateProxyMethods(superClass, methods, selfType, cw, clazzInit);

        // finish class initializer
        clazzInit.returnValue();
        clazzInit.endMethod();

        // end class
        cw.visitEnd();

        byte[] data = cw.toByteArray();
View Full Code Here

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

        gh.loadThis();
        gh.getField(selfType, INVOCATION_HANDLER_FIELD_NAME,
                INVOCATION_HANDLER_TYPE);
        gh.returnValue();
        gh.endMethod();
    }

    private static void generateGetProxyClass(Type selfType, ClassVisitor cw) {
        // make getter for proxy class
        GeneratorAdapter gpc = new GeneratorAdapter(Opcodes.ACC_PUBLIC,
View Full Code Here

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

                new org.objectweb.asm.commons.Method("___getProxyClass",
                        PROXY_CLASS_TYPE, EMPTY_TYPE_ARR), null,
                EMPTY_TYPE_ARR, cw);
        gpc.getStatic(selfType, PROXY_CLASS_FIELD_NAME, PROXY_CLASS_TYPE);
        gpc.returnValue();
        gpc.endMethod();
    }

    private static void generateConstructors(Class superClass, Type selfType,
            ClassVisitor cw) {
        Constructor[] cons = superClass.getDeclaredConstructors();
View Full Code Here

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

                .getMethod("void <init>(java.lang.Throwable)"));
        ga.throwException();

        ga.visitTryCatchBlock(before, after, handler, "java/lang/Throwable");

        ga.endMethod();

        //
        // construct the super-proxy method
        //
        if (md.isImplemented()) {
View Full Code Here

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

            ga2.loadThis();
            ga2.loadArgs();
            ga2.invokeConstructor(superType, m);
            ga2.returnValue();
            ga2.endMethod();
        }
    }

    private static Class[] generateConstructor(Type selfType,
            Constructor constructor, ClassVisitor cw) {
View Full Code Here

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

        ga.putField(selfType, INVOCATION_HANDLER_FIELD_NAME,
                INVOCATION_HANDLER_TYPE);

        // do a void return
        ga.returnValue();
        ga.endMethod();
        return newConstructorParameterTypes;
    }

    private static String toInternalClassName(Class clazz) {
        return toInternalClassName(clazz.getName());
View Full Code Here

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

    // load this to get the field
    methodAdapter.loadThis();
    // get the dispatcher field and return
    methodAdapter.getField(typeBeingWoven, DISPATCHER_FIELD, DISPATCHER_TYPE);
    methodAdapter.returnValue();
    methodAdapter.endMethod();

    // /////////////////////////////////////////////////////

    // add a method for checking if the dispatcher is set
    methodAdapter = getMethodGenerator(PUBLIC_GENERATED_METHOD_ACCESS, new Method(
View Full Code Here

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

    // mark the returnTrueLable
    methodAdapter.mark(returnTrueLabel);
    methodAdapter.push(true);
    methodAdapter.returnValue();
    // end the method
    methodAdapter.endMethod();

    // ///////////////////////////////////////////////////////
  }

  /**
 
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.