Examples of AnalyzerAdapter


Examples of org.deuce.objectweb.asm.commons.AnalyzerAdapter

    this.isStatic = (access & Opcodes.ACC_STATIC) != 0;
   
    // The AnalyzerAdapter delegates the call to the DuplicateMethod, while the DuplicateMethod uses
    // the analyzer for stack state in the original method.
    duplicateMethod = new DuplicateMethod( copyMethod, isStatic, newMethod, fieldsHolder, className);
    AnalyzerAdapter analyzerAdapter = new AnalyzerAdapter( className, access, methodName, descriptor, duplicateMethod);
    duplicateMethod.setAnalyzer( analyzerAdapter);
   
    this.copyMethod = analyzerAdapter;
    this.className = className;
    this.methodName = methodName;
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

      String desc, String signature, String[] exceptions) {
    MethodVisitor mv = cv.visitMethod(access, name, desc, signature,
        exceptions);
    if (!isInterface && mv != null && !name.equals("<init>")) {
      AddTimerMethodAdapter5 at = new AddTimerMethodAdapter5(mv);
      at.aa = new AnalyzerAdapter(owner, access, name, desc, at);
      at.lvs = new LocalVariablesSorter(access, desc, at.aa);
      return at.lvs;
    }
    return mv;
  }
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

public class RemoveUnusedCastAdapterTest extends AbstractTestCase {

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    RemoveUnusedCastAdapter rc = new RemoveUnusedCastAdapter(tmv);
    AnalyzerAdapter aa = new AnalyzerAdapter("C", ACC_PUBLIC, "m",
        "(Ljava/lang/Integer;)I", rc);
    rc.aa = aa;
    aa.visitCode();
    aa.visitVarInsn(ALOAD, 1);
    aa.visitTypeInsn(CHECKCAST, "java/lang/Number");
    aa.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Number", "intValue",
        "()I");
    aa.visitInsn(IRETURN);
    aa.visitMaxs(1, 2);
    aa.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

      @Override
      public MethodVisitor visitMethod(int access, String name,
          String desc, String signature, String[] exceptions) {
        RemoveUnusedCastAdapter rc = new RemoveUnusedCastAdapter(cv
            .visitMethod(access, name, desc, signature, exceptions));
        AnalyzerAdapter aa = new AnalyzerAdapter(owner, access, name,
            desc, rc);
        rc.aa = aa;
        return aa;
      }
    };
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

        super.visitEnd();
        LabelFlowAnalyzer.markLabels(this);
        final MethodProbesAdapter probesAdapter = new MethodProbesAdapter(
            methodProbes, ClassProbesAdapter.this);
        if (trackFrames) {
          final AnalyzerAdapter analyzer = new AnalyzerAdapter(
              ClassProbesAdapter.this.name, access, name, desc,
              probesAdapter);
          probesAdapter.setAnalyzer(analyzer);
          this.accept(analyzer);
        } else {
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

        super.visitEnd();
        LabelFlowAnalyzer.markLabels(this);
        final MethodProbesAdapter probesAdapter = new MethodProbesAdapter(
            methodProbes, ClassProbesAdapter.this);
        if (trackFrames) {
          final AnalyzerAdapter analyzer = new AnalyzerAdapter(
              ClassProbesAdapter.this.name, access, name, desc,
              probesAdapter);
          probesAdapter.setAnalyzer(analyzer);
          this.accept(analyzer);
        } else {
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

  private MethodVisitor expectedVisitor;

  @Before
  public void setup() {
    analyzer = new AnalyzerAdapter("Foo", 0, "doit", "()V", null);
    expected = new MethodRecorder();
    expectedVisitor = expected.getVisitor();
  }
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter

    expectedVisitor = new TraceAdapter(expected);
    actual = new MethodRecorder();
    MethodProbesVisitor actualVisitor = new TraceAdapter(actual);
    MethodProbesAdapter probesAdapter = new MethodProbesAdapter(
        actualVisitor, this);
    final AnalyzerAdapter analyzer = new AnalyzerAdapter("Foo", 0, "doit",
        "()V", probesAdapter);
    probesAdapter.setAnalyzer(analyzer);
    adapter = analyzer;
    frame = new IFrame() {
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.