Class 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 Detail

      • 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 Detail

      • 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 Detail

      • 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