Package org.objectweb.asm.commons

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


    gen.visitCode();
    gen.loadThis();
    gen.getField(classType, "data", Type.getObjectType("[Z"));
    gen.returnValue();
    gen.visitMaxs(1, 0);
    gen.visitEnd();

    // a()
    gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC, "a",
        "()V", null, new String[0]), Opcodes.ACC_PUBLIC, "a", "()V");
    gen.visitCode();
View Full Code Here


    gen.push(0);
    gen.push(1);
    gen.arrayStore(Type.BOOLEAN_TYPE);
    gen.returnValue();
    gen.visitMaxs(3, 0);
    gen.visitEnd();

    // b()
    gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC, "b",
        "()V", null, new String[0]), Opcodes.ACC_PUBLIC, "b", "()V");
    gen.visitCode();
View Full Code Here

    gen.push(1);
    gen.push(1);
    gen.arrayStore(Type.BOOLEAN_TYPE);
    gen.returnValue();
    gen.visitMaxs(3, 0);
    gen.visitEnd();

    writer.visitEnd();

    final TargetLoader loader = new TargetLoader(className
        .replace('/', '.'), writer.toByteArray());
View Full Code Here

    // Stack[0]: [Z

    gen.returnValue();

    gen.visitMaxs(Math.max(size, 2), 0); // Maximum local stack size is 2
    gen.visitEnd();
  }

  /**
   * Generates the byte code to initialize the static coverage data field
   * within this class.
View Full Code Here

    gen.loadThis();
    final int size = runtime.generateDataAccessor(classid, gen);
    gen.putField(classType, "data", GeneratorConstants.DATAFIELD_TYPE);
    gen.returnValue();
    gen.visitMaxs(size + 1, 0);
    gen.visitEnd();

    // get()
    gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC,
        "get", "()[[Z", null, new String[0]), Opcodes.ACC_PUBLIC,
        "get", "()[[Z");
View Full Code Here

    gen.visitCode();
    gen.loadThis();
    gen.getField(classType, "data", GeneratorConstants.DATAFIELD_TYPE);
    gen.returnValue();
    gen.visitMaxs(1, 0);
    gen.visitEnd();

    // a()
    gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC, "a",
        "()V", null, new String[0]), Opcodes.ACC_PUBLIC, "a", "()V");
    gen.visitCode();
View Full Code Here

    gen.push(0);
    gen.push(1);
    gen.arrayStore(Type.BOOLEAN_TYPE);
    gen.returnValue();
    gen.visitMaxs(3, 0);
    gen.visitEnd();

    // b()
    gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC, "b",
        "()V", null, new String[0]), Opcodes.ACC_PUBLIC, "b", "()V");
    gen.visitCode();
View Full Code Here

    gen.push(0);
    gen.push(1);
    gen.arrayStore(Type.BOOLEAN_TYPE);
    gen.returnValue();
    gen.visitMaxs(3, 0);
    gen.visitEnd();

    writer.visitEnd();

    final TargetLoader loader = new TargetLoader(className
        .replace('/', '.'), writer.toByteArray());
View Full Code Here

    // Return the method's block array:
    gen.visitLabel(alreadyInitialized);
    gen.returnValue();

    gen.visitMaxs(Math.max(size, 2), 0); // Maximum local stack size is 2
    gen.visitEnd();
  }

  /**
   * Generates the byte code to initialize the static coverage data field
   * within this class.
View Full Code Here

      adapter.returnValue();
     
      Label end = new Label();
      adapter.visitLabel(end);
      adapter.visitLocalVariable("this", "L"+classType+";", null, start, end, 0);
      adapter.visitEnd();
     
      adapter.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.