Package org.aspectj.apache.bcel.generic

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


  // assumes that there is no already extant source line tag. Otherwise we'll
  // have to be better.
  public static void setSourceLine(InstructionHandle ih, int lineNumber) {
    // OPTIMIZE LineNumberTag instances for the same line could be shared
    // throughout a method...
    ih.addTargeter(new LineNumberTag(lineNumber));
  }
View Full Code Here


    // invoke the advice
    advice.append(munger.getNonTestAdviceInstructions(this));
    advice.append(returnConversionCode);
    if (getKind() == Shadow.MethodExecution && linenumber > 0) {
      advice.getStart().addTargeter(new LineNumberTag(linenumber));
    }

    if (!hasDynamicTest) {
      range.append(advice);
    } else {
View Full Code Here

      // } 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

   * On entry to this method we have a method whose instruction stream contains a few instructions that have line numbers assigned
   * to them (LineNumberTags). The aim is to ensure every instruction has the right line number. This is necessary because some of
   * them may be extracted out into other methods - and it'd be useful for them to maintain the source line number for debugging.
   */
  public void ensureAllLineNumberSetup() {
    LineNumberTag lastKnownLineNumberTag = null;
    boolean skip = false;
    for (InstructionHandle ih = body.getStart(); ih != null; ih = ih.getNext()) {
      skip = false;
      for (InstructionTargeter targeter : ih.getTargeters()) {
        if (targeter instanceof LineNumberTag) {
View Full Code Here

      // } 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

    // invoke the advice
    advice.append(munger.getNonTestAdviceInstructions(this));
    advice.append(returnConversionCode);
    if (getKind() == Shadow.MethodExecution && linenumber > 0) {
      advice.getStart().addTargeter(new LineNumberTag(linenumber));
    }

    if (!hasDynamicTest) {
      range.append(advice);
    } else {
View Full Code Here

  // assumes that there is no already extant source line tag. Otherwise we'll
  // have to be better.
  public static void setSourceLine(InstructionHandle ih, int lineNumber) {
    // OPTIMIZE LineNumberTag instances for the same line could be shared
    // throughout a method...
    ih.addTargeter(new LineNumberTag(lineNumber));
  }
View Full Code Here

   * On entry to this method we have a method whose instruction stream contains a few instructions that have line numbers assigned
   * to them (LineNumberTags). The aim is to ensure every instruction has the right line number. This is necessary because some of
   * them may be extracted out into other methods - and it'd be useful for them to maintain the source line number for debugging.
   */
  public void ensureAllLineNumberSetup() {
    LineNumberTag lastKnownLineNumberTag = null;
    boolean skip = false;
    for (InstructionHandle ih = body.getStart(); ih != null; ih = ih.getNext()) {
      skip = false;
      for (InstructionTargeter targeter : ih.getTargeters()) {
        if (targeter instanceof LineNumberTag) {
View Full Code Here

   * On entry to this method we have a method whose instruction stream contains a few instructions that have line numbers assigned
   * to them (LineNumberTags). The aim is to ensure every instruction has the right line number. This is necessary because some of
   * them may be extracted out into other methods - and it'd be useful for them to maintain the source line number for debugging.
   */
  public void ensureAllLineNumberSetup() {
    LineNumberTag lastKnownLineNumberTag = null;
    boolean skip = false;
    for (InstructionHandle ih = body.getStart(); ih != null; ih = ih.getNext()) {
      skip = false;
      for (InstructionTargeter targeter : ih.getTargeters()) {
        if (targeter instanceof LineNumberTag) {
View Full Code Here

TOP

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

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.