Examples of newMethod()


Examples of org.objectweb.asm.ClassWriter.newMethod()

     * World(ISaveHandler saveHandler, String worldName,
            WorldProvider provider, WorldSettings worldSettings,
            Profiler theProfiler, ILogAgent worldLogAgent)
     **/
    String sig = "(Lnet/minecraft/world/storage/ISaveHandler;Ljava/lang/String;Lnet/minecraft/world/WorldProvider;Lnet/minecraft/world/WorldSettings;Lnet/minecraft/profiler/Profiler;Lnet/minecraft/logging/ILogAgent;)V";
    cw.newMethod(name, "<init>", sig, true);
    MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", sig, null, null);
    mv.visitCode();
    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitInsn(Opcodes.DUP);
    mv.visitInsn(Opcodes.DUP);
View Full Code Here

Examples of org.objectweb.asm.ClassWriter.newMethod()

            ISaveHandler saveHandler, String worldName,
            WorldProvider provider, WorldSettings worldSettings,
            Profiler theProfiler, ILogAgent worldLogAgent)
     **/
    String sig = "(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/world/storage/ISaveHandler;Ljava/lang/String;Lnet/minecraft/world/WorldProvider;Lnet/minecraft/world/WorldSettings;Lnet/minecraft/profiler/Profiler;Lnet/minecraft/logging/ILogAgent;)V";
    cw.newMethod(name, "<init>", sig, true);
    MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", sig, null, null);
    mv.visitCode();
    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitInsn(Opcodes.DUP);
    mv.visitInsn(Opcodes.DUP);
View Full Code Here

Examples of org.objectweb.asm.ClassWriter.newMethod()

    name = name.replace('.', '/');
    ClassNode cn = new ClassNode(ASM4);
    cr.accept(cn, 0);
    ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    cw.newMethod(name, "cofh_validate", "()V", true);
    MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "cofh_validate", "()V", null, null);
    mv.visitCode();
    mv.visitInsn(RETURN);
    mv.visitMaxs(0, 1);
    mv.visitEnd();
View Full Code Here

Examples of org.objectweb.asm.ClassWriter.newMethod()

    if (!found) {
      /*
       * new World constructor World(ISaveHandler saveHandler, String worldName, WorldProvider provider, WorldSettings worldSettings, Profiler
       * theProfiler)
       */
      cw.newMethod(name, "<init>", sig, true);
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", sig, null, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitInsn(DUP);
      mv.visitInsn(DUP);
View Full Code Here

Examples of org.objectweb.asm.ClassWriter.newMethod()

      cn.accept(cw);
      /*
       * new WorldServer constructor WorldServer(MinecraftServer minecraftServer, ISaveHandler saveHandler, String worldName, WorldProvider provider,
       * WorldSettings worldSettings, Profiler theProfiler)
       */
      cw.newMethod(name, "<init>", sig, true);
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", sig, null, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitInsn(DUP);
      mv.visitInsn(DUP);
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleClassBuilder.newMethod()

      JimpleClassBuilder invokerClass = context.getJimpleOutput().newClass();
      invokerClass.setClassName(invokerName);
      invokerClass.addInterface(getInterfaceName(method));

      JimpleMethodBuilder applyMethod = invokerClass.newMethod();
      applyMethod.setModifiers(JimpleModifiers.PUBLIC);
      applyMethod.setName("apply");
      applyMethod.setReturnType(method.getReturnType());

      int paramIndex = 0;
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleInterfaceBuilder.newMethod()

    JimpleInterfaceBuilder iface = context.getJimpleOutput().newInterface();
    iface.setPackageName(PACKAGE_NAME);
    iface.setClassName(signature.interfaceName());
    iface.extendsInterface("org.renjin.gcc.runtime.FunPtr");

    JimpleMethodBuilder applyMethod = iface.newMethod();
    applyMethod.setName("apply");
    applyMethod.setReturnType(signature.getReturnType());

    int paramIndex = 0;
    for (JimpleType paramType : signature.getParameterTypes()) {
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType.newMethod()

    serviceInterface.setNestedName(Constants.RPC_SERVICE_INTERFACE);
    serviceInterface.setStatic(true);
    serviceInterface.setSuperType(this.getRemoteService());
    serviceInterface.setVisibility(Visibility.PUBLIC);

    final NewMethod newMethod = serviceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType.newMethod()

    final NewNestedInterfaceType asyncServiceInterface = newType.newNestedInterfaceType();
    asyncServiceInterface.setNestedName(Constants.RPC_ASYNC_SERVICE_INTERFACE);
    asyncServiceInterface.setStatic(true);
    asyncServiceInterface.setVisibility(Visibility.PUBLIC);

    final NewMethod newMethod = asyncServiceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
    newMethod.setReturnType(context.getVoid());
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType.newMethod()

    serviceInterface.setNestedName(Constants.RPC_SERVICE_INTERFACE);
    serviceInterface.setStatic(true);
    serviceInterface.setSuperType(this.getRemoteService());
    serviceInterface.setVisibility(Visibility.PUBLIC);

    final NewMethod newMethod = serviceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
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.