Class LineNumberPrependingMethodVisitor

java.lang.Object
org.objectweb.asm.MethodVisitor
net.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor
net.bytebuddy.utility.visitor.LineNumberPrependingMethodVisitor

public class LineNumberPrependingMethodVisitor extends ExceptionTableSensitiveMethodVisitor
A method visitor that maps the first available line number information, if available, to the beginning of the method.
  • Field Details

    • startOfMethod

      private final org.objectweb.asm.Label startOfMethod
      A label indicating the start of the method.
    • prependLineNumber

      private boolean prependLineNumber
      true if the first line number was not yet discovered.
  • Constructor Details

    • LineNumberPrependingMethodVisitor

      public LineNumberPrependingMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor)
      Creates a new line number prepending method visitor.
      Parameters:
      methodVisitor - The method visitor to delegate to.
  • Method Details

    • onAfterExceptionTable

      protected void onAfterExceptionTable()
      Description copied from class: ExceptionTableSensitiveMethodVisitor
      Invoked after the exception table was visited. Typically, the exception table is visited by ASM at the beginning of a method. It is however possible that a user adds exception table entries at a later point. Normally, this is however not meaningful use of ASM.
      Specified by:
      onAfterExceptionTable in class ExceptionTableSensitiveMethodVisitor
    • visitLineNumber

      public void visitLineNumber(int line, org.objectweb.asm.Label start)
      Overrides:
      visitLineNumber in class org.objectweb.asm.MethodVisitor