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 booleantrueif the first line number was not yet discovered.private final org.objectweb.asm.LabelA 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 voidInvoked after the exception table was visited.voidvisitLineNumber(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, visitVarInsnMethods 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 prependLineNumbertrueif 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:ExceptionTableSensitiveMethodVisitorInvoked 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:
onAfterExceptionTablein classExceptionTableSensitiveMethodVisitor
-
visitLineNumber
public void visitLineNumber(int line, org.objectweb.asm.Label start) - Overrides:
visitLineNumberin classorg.objectweb.asm.MethodVisitor
-