Package org.aspectj.apache.bcel.generic

Examples of org.aspectj.apache.bcel.generic.InstructionTargeter


      if (ih == null) {
        return -1;
      }
      Iterator<InstructionTargeter> tIter = ih.getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter t = tIter.next();
        if (t instanceof LineNumberTag) {
          return ((LineNumberTag) t).getLineNumber();
        }
      }
      // if (goforwards) ih=ih.getNext(); else
View Full Code Here


    if (startOfHandler.getInstruction().isStoreInstruction() && startOfHandler.getNext() != null) {
      int slot = startOfHandler.getInstruction().getIndex();
      // System.out.println("got store: " + startOfHandler.getInstruction() + ", " + index);
      Iterator tIter = startOfHandler.getNext().getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter targeter = (InstructionTargeter) tIter.next();
        if (targeter instanceof LocalVariableTag) {
          LocalVariableTag t = (LocalVariableTag) targeter;
          if (t.getSlot() == slot) {
            return t.getName();
          }
View Full Code Here

      // boolean hasPendingTargeters = false;
      int lcounter = 0;
      for (InstructionHandle ih = body.getStart(); ih != null; ih = ih.getNext()) {
        Iterator<InstructionTargeter> tIter = ih.getTargeters().iterator();
        while (tIter.hasNext()) {
          InstructionTargeter t = tIter.next();// targeters
          // [
          // i
          // ]
          // ;
          if (t instanceof ExceptionRange) {
View Full Code Here

      // copy over tags and range attributes

      Iterator<InstructionTargeter> tIter = src.getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter old = tIter.next();
        if (old instanceof Tag) {
          Tag oldTag = (Tag) old;
          Tag fresh = tagMap.get(oldTag);
          if (fresh == null) {
            fresh = oldTag.copy();
View Full Code Here

    Iterator<InstructionTargeter> tIter = ih.getTargeters().iterator();
    if (!tIter.hasNext()) {
      throw new BCException("range handle with no range in " + from);
    }
    while (tIter.hasNext()) {
      InstructionTargeter ts = tIter.next();
      if (ts instanceof Range) {
        if (ret != null) {
          throw new BCException("range handle with multiple ranges in " + from);
        }
        ret = (Range) ts;
View Full Code Here

      // copy over tags and range attributes

      Iterator<InstructionTargeter> tIter = src.getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter old = tIter.next();
        if (old instanceof Tag) {
          Tag oldTag = (Tag) old;
          Tag fresh = tagMap.get(oldTag);
          if (fresh == null) {
            fresh = oldTag.copy();
View Full Code Here

  protected static final Range getRange(InstructionHandle ih) {
    // assert isRangeHandle(ih)
    Range ret = null;
    Iterator<InstructionTargeter> tIter = ih.getTargeters().iterator();
    while (tIter.hasNext()) {
      InstructionTargeter targeter = tIter.next();
      if (targeter instanceof Range) {
        Range r = (Range) targeter;
        if (r.getStart() != ih && r.getEnd() != ih) {
          continue;
        }
View Full Code Here

    // now go through again and update variable slots that have been altered as a result
    // of remapping...
    for (InstructionHandle newIh = freshBody.getStart(); newIh != freshBody.getEnd(); newIh = newIh.getNext()) {
      Iterator<InstructionTargeter> tIter = newIh.getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter source = tIter.next();
        if (source instanceof LocalVariableTag) {
          LocalVariableTag lvt = (LocalVariableTag) source;
          if (!lvt.isRemapped() && remap.hasKey(lvt.getSlot())) {
            lvt.updateSlot(remap.get(lvt.getSlot()));
          }
View Full Code Here

    if (startOfHandler.getInstruction().isStoreInstruction() && startOfHandler.getNext() != null) {
      int slot = startOfHandler.getInstruction().getIndex();
      // System.out.println("got store: " + startOfHandler.getInstruction() + ", " + index);
      Iterator<InstructionTargeter> tIter = startOfHandler.getNext().getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter targeter = tIter.next();
        if (targeter instanceof LocalVariableTag) {
          LocalVariableTag t = (LocalVariableTag) targeter;
          if (t.getSlot() == slot) {
            return t.getName();
          }
View Full Code Here

      if (ih == null) {
        return -1;
      }
      Iterator<InstructionTargeter> tIter = ih.getTargeters().iterator();
      while (tIter.hasNext()) {
        InstructionTargeter t = tIter.next();
        if (t instanceof LineNumberTag) {
          return ((LineNumberTag) t).getLineNumber();
        }
      }
      // if (goforwards) ih=ih.getNext(); else
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.generic.InstructionTargeter

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.