Package net.bytebuddy.utility.visitor
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 Summary
Fields Modifier and Type Field Description private boolean
prependLineNumber
true
if the first line number was not yet discovered.private org.objectweb.asm.Label
startOfMethod
A label indicating the start of the method.
-
Constructor Summary
Constructors Constructor Description LineNumberPrependingMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor)
Creates a new line number prepending method visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
onAfterExceptionTable()
Invoked after the exception table was visited.void
visitLineNumber(int line, org.objectweb.asm.Label start)
-
Methods inherited from class net.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor
onVisitFieldInsn, onVisitFrame, onVisitIincInsn, onVisitInsn, onVisitIntInsn, onVisitInvokeDynamicInsn, onVisitJumpInsn, onVisitLabel, onVisitLdcInsn, onVisitLookupSwitchInsn, onVisitMethodInsn, onVisitMethodInsn, onVisitMultiANewArrayInsn, onVisitTableSwitchInsn, onVisitTypeInsn, onVisitVarInsn, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitTableSwitchInsn, visitTypeInsn, visitVarInsn
-
Methods inherited from class org.objectweb.asm.MethodVisitor
visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitInsnAnnotation, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation
-
-
-
-
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 classExceptionTableSensitiveMethodVisitor
-
visitLineNumber
public void visitLineNumber(int line, org.objectweb.asm.Label start)
- Overrides:
visitLineNumber
in classorg.objectweb.asm.MethodVisitor
-
-