Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.EmptyVisitor


    };
    try {
      final InputStream stream = resource.getInputStream();
      final ClassReader reader = new ClassReader(stream);
      stream.close();
      reader.accept(new RemappingClassAdapter(new EmptyVisitor(),
          remapper), 0);
    } catch (final IOException e) {
      throw new BuildException(e);
    }
    return dependencies;
View Full Code Here


    };
    try {
      final InputStream stream = resource.getInputStream();
      final ClassReader reader = new ClassReader(stream);
      stream.close();
      reader.accept(new RemappingClassAdapter(new EmptyVisitor(),
          remapper), ClassReader.EXPAND_FRAMES);
    } catch (final IOException e) {
      throw new BuildException(e);
    }
    return dependencies;
View Full Code Here

  private ClassInstrumenter instrumenter;

  @Before
  public void setup() {
    runtime = new LoggerRuntime();
    instrumenter = new ClassInstrumenter(123, runtime, new EmptyVisitor());
  }
View Full Code Here

        null, null);
  }

  @Test
  public void testNoMethodVisitor() {
    instrumenter = new ClassInstrumenter(123, runtime, new EmptyVisitor() {
      @Override
      public MethodVisitor visitMethod(int access, String name,
          String desc, String signature, String[] exceptions) {
        return null;
      }
View Full Code Here

  }

  @Test
  public void testNoLocalVariablesInDataAccessor()
      throws InstantiationException, IllegalAccessException {
    runtime.generateDataAccessor(1001, "Target", 5, new EmptyVisitor() {
      @Override
      public void visitVarInsn(int opcode, int var) {
        fail("No usage of local variables allowed.");
      }
    });
View Full Code Here

  }

  @Test
  public void testNoLocalVariablesInDataAccessor()
      throws InstantiationException, IllegalAccessException {
    runtime.generateDataAccessor(1001, "Target", 5, new EmptyVisitor() {
      @Override
      public void visitVarInsn(int opcode, int var) {
        fail("No usage of local variables allowed.");
      }
    });
View Full Code Here

    assertFrames(instrumented, frames);
  }

  private void assertFrames(byte[] source, boolean expected) {
    final boolean[] hasFrames = new boolean[] { false };
    new ClassReader(source).accept(new EmptyVisitor() {

      @Override
      public MethodVisitor visitMethod(int access, String name,
          String desc, String signature, String[] exceptions) {
        return new EmptyVisitor() {

          @Override
          public void visitFrame(int type, int nLocal,
              Object[] local, int nStack, Object[] stack) {
            hasFrames[0] = true;
View Full Code Here

  }

  @Test
  public void testVisitVarIns() {
    ProbeVariableInserter i = new ProbeVariableInserter(0, "(II)V",
        new EmptyVisitor() {
          @Override
          public void visitVarInsn(final int opcode, final int var) {
            ProbeVariableInserterTest.this.var = var;
          }
        });
View Full Code Here

  }

  @Test
  public void testVisitIincInsn() {
    ProbeVariableInserter i = new ProbeVariableInserter(0, "(II)V",
        new EmptyVisitor() {
          @Override
          public void visitIincInsn(final int var, final int increment) {
            ProbeVariableInserterTest.this.var = var;
          }
        });
View Full Code Here

  }

  @Test
  public void testVisitLocalVariable() {
    ProbeVariableInserter i = new ProbeVariableInserter(0, "(II)V",
        new EmptyVisitor() {
          @Override
          public void visitLocalVariable(final String name,
              final String desc, final String signature,
              final Label start, final Label end, final int index) {
            ProbeVariableInserterTest.this.var = index;
View Full Code Here

TOP

Related Classes of org.objectweb.asm.commons.EmptyVisitor

Copyright © 2018 www.massapicom. 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.