Examples of addTargeter()


Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

      // } else { // If it wasn't, the best we can do is the line number of the first instruction in the method
      lineNumber = shadow.getEnclosingMethod().getMemberView().getLineNumberOfFirstInstruction();
      // }
      InstructionHandle start = il.getStart();
      if (lineNumber > 0) {
        start.addTargeter(new LineNumberTag(lineNumber));
      }
      // Fix up the local variables: find any that have a startPC of 0 and ensure they target the new start of the method
      LocalVariableTable lvt = shadow.getEnclosingMethod().getMemberView().getMethod().getLocalVariableTable();
      if (lvt != null) {
        LocalVariable[] lvTable = lvt.getLocalVariableTable();
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

      if (lvt != null) {
        LocalVariable[] lvTable = lvt.getLocalVariableTable();
        for (int i = 0; i < lvTable.length; i++) {
          LocalVariable lv = lvTable[i];
          if (lv.getStartPC() == 0) {
            start.addTargeter(new LocalVariableTag(lv.getSignature(), lv.getName(), lv.getIndex(), 0));
          }
        }
      }
    }
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

        argumentName = parameterNames.get(argNumber);
      }
      String argumentSignature = args[argNumber].getSignature();
      LocalVariableTag lvt = new LocalVariableTag(argumentSignature, argumentName, slot, 0);
      start.addTargeter(lvt);
      end.addTargeter(lvt);
      slot += args[argNumber].getSize();
    }
  }

  /**
 
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

            // what about a try..catch that starts at the start
            // of the exception handler? need to only include
            // certain targeters really.
            er.updateTarget(ih, newNOP, mg.getBody());
            for (InstructionTargeter t2 : targeters) {
              newNOP.addTargeter(t2);
            }
            ih.removeAllTargeters();
            match(BcelShadow.makeExceptionHandler(world, er, mg, newNOP, enclosingShadow), shadowAccumulator);
          } else {
            match(BcelShadow.makeExceptionHandler(world, er, mg, ih, enclosingShadow), shadowAccumulator);
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

        if (handlesForDeletion.contains(oneTarget)) {
          do {
            oneTarget = oneTarget.getNext();
          } while (handlesForDeletion.contains(oneTarget));
          iSelect.setTarget(k, oneTarget);
          oneTarget.addTargeter(branchInstruction);
        }
      }
    }
  }
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

    advice.addAnnotation(aaj);
    InstructionHandle start = adviceBody.getStart();

    // Setup the local variable targeters so that the binding will work
    String sig = concreteAspect.name.replace('.', '/');
    start.addTargeter(new LocalVariableTag("L" + sig + ";", "this", 0, start.getPosition()));
    if (paramNames.size() > 0) {
      for (int i = 0; i < paramNames.size(); i++) {
        start.addTargeter(new LocalVariableTag(paramTypes.get(i).getSignature(), paramNames.get(i), i + 1, start
            .getPosition()));
      }
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

    // Setup the local variable targeters so that the binding will work
    String sig = concreteAspect.name.replace('.', '/');
    start.addTargeter(new LocalVariableTag("L" + sig + ";", "this", 0, start.getPosition()));
    if (paramNames.size() > 0) {
      for (int i = 0; i < paramNames.size(); i++) {
        start.addTargeter(new LocalVariableTag(paramTypes.get(i).getSignature(), paramNames.get(i), i + 1, start
            .getPosition()));
      }
    }

    // Record the new method in the class
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

            // what about a try..catch that starts at the start
            // of the exception handler? need to only include
            // certain targeters really.
            er.updateTarget(ih, newNOP, mg.getBody());
            for (InstructionTargeter t2 : targeters) {
              newNOP.addTargeter(t2);
            }
            ih.removeAllTargeters();
            match(BcelShadow.makeExceptionHandler(world, er, mg, newNOP, enclosingShadow), shadowAccumulator);
          } else {
            match(BcelShadow.makeExceptionHandler(world, er, mg, ih, enclosingShadow), shadowAccumulator);
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

      // } else { // If it wasn't, the best we can do is the line number of the first instruction in the method
      lineNumber = shadow.getEnclosingMethod().getMemberView().getLineNumberOfFirstInstruction();
      // }
      InstructionHandle start = il.getStart();
      if (lineNumber > 0) {
        start.addTargeter(new LineNumberTag(lineNumber));
      }
      // Fix up the local variables: find any that have a startPC of 0 and ensure they target the new start of the method
      LocalVariableTable lvt = shadow.getEnclosingMethod().getMemberView().getMethod().getLocalVariableTable();
      if (lvt != null) {
        LocalVariable[] lvTable = lvt.getLocalVariableTable();
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.InstructionHandle.addTargeter()

      if (lvt != null) {
        LocalVariable[] lvTable = lvt.getLocalVariableTable();
        for (int i = 0; i < lvTable.length; i++) {
          LocalVariable lv = lvTable[i];
          if (lv.getStartPC() == 0) {
            start.addTargeter(new LocalVariableTag(lv.getSignature(), lv.getName(), lv.getIndex(), 0));
          }
        }
      }
    }
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.