Top Description Fields Constructors Methods
org.easymock.bytebuddy.utility.visitor

public Class LineNumberPrependingMethodVisitor

extends ExceptionTableSensitiveMethodVisitor
Class Inheritance
Imports
org.easymock.bytebuddy.utility.OpenedClassReader, org.easymock.bytebuddy.jar.asm.Label, .MethodVisitor

A method visitor that maps the first available line number information, if available, to the beginning of the method.

Field Summary

Modifier and TypeField and Description
private boolean
prependLineNumber

true if the first line number was not yet discovered.

private final Label
startOfMethod

A label indicating the start of the method.

Constructor Summary

AccessConstructor and Description
public
LineNumberPrependingMethodVisitor(MethodVisitor
The method visitor to delegate to.
methodVisitor
)

Creates a new line number prepending method visitor.

Method Summary

Modifier and TypeMethod and Description
protected void
public void
visitLineNumber(int
a line number. This number refers to the source file from which the class was compiled.
line
,
Label
the first instruction corresponding to this line number.
start
)

Overrides org.easymock.bytebuddy.jar.asm.MethodVisitor.visitLineNumber.

Visits a line number declaration.
Inherited from org.easymock.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor:
onVisitFieldInsnonVisitFrameonVisitIincInsnonVisitInsnonVisitIntInsnonVisitInvokeDynamicInsnonVisitJumpInsnonVisitLabelonVisitLdcInsnonVisitLookupSwitchInsnonVisitMethodInsnonVisitMethodInsnonVisitMultiANewArrayInsnonVisitTableSwitchInsnonVisitTypeInsnonVisitVarInsnvisitFieldInsnvisitFramevisitIincInsnvisitInsnvisitIntInsnvisitInvokeDynamicInsnvisitJumpInsnvisitLabelvisitLdcInsnvisitLookupSwitchInsnvisitMethodInsnvisitMethodInsnvisitMultiANewArrayInsnvisitTableSwitchInsnvisitTypeInsnvisitVarInsn

Field Detail

prependLineNumberback to summary
private boolean prependLineNumber

true if the first line number was not yet discovered.

startOfMethodback to summary
private final Label startOfMethod

A label indicating the start of the method.

Constructor Detail

LineNumberPrependingMethodVisitorback to summary
public LineNumberPrependingMethodVisitor(MethodVisitor methodVisitor)

Creates a new line number prepending method visitor.

Parameters
methodVisitor:MethodVisitor

The method visitor to delegate to.

Method Detail

onAfterExceptionTableback to summary
protected void onAfterExceptionTable()

Implements abstract org.easymock.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor.onAfterExceptionTable.

Doc from org.easymock.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor.onAfterExceptionTable.

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.

Annotations
@Override
visitLineNumberback to summary
public void visitLineNumber(int line, Label start)

Overrides org.easymock.bytebuddy.jar.asm.MethodVisitor.visitLineNumber.

Doc from org.easymock.bytebuddy.jar.asm.MethodVisitor.visitLineNumber.

Visits a line number declaration.

Parameters
line:int

a line number. This number refers to the source file from which the class was compiled.

start:Label

the first instruction corresponding to this line number.

Annotations
@Override