Package net.bytebuddy.utility.visitor
Class LineNumberPrependingMethodVisitor
java.lang.Object
org.objectweb.asm.MethodVisitor
net.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor
net.bytebuddy.utility.visitor.LineNumberPrependingMethodVisitor
A method visitor that maps the first available line number information, if available, to the beginning of the method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
true
if the first line number was not yet discovered.private final org.objectweb.asm.Label
A label indicating the start of the method.Fields inherited from class org.objectweb.asm.MethodVisitor
api, mv
-
Constructor Summary
ConstructorsConstructorDescriptionLineNumberPrependingMethodVisitor
(org.objectweb.asm.MethodVisitor methodVisitor) Creates a new line number prepending method visitor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
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
getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitInsnAnnotation, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation
-
Field Details
-
startOfMethod
private final org.objectweb.asm.Label startOfMethodA label indicating the start of the method. -
prependLineNumber
private boolean prependLineNumbertrue
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 classExceptionTableSensitiveMethodVisitor
-
visitLineNumber
public void visitLineNumber(int line, org.objectweb.asm.Label start) - Overrides:
visitLineNumber
in classorg.objectweb.asm.MethodVisitor
-