Interface OffsetToLineNumberConverter
- All Known Implementing Classes:
LineNumberTableConverter
public interface OffsetToLineNumberConverter
An instance capable of converting from a raw bytecode offset number to a Java
source code line number.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OffsetToLineNumberConverter
a do-nothing offset-to-line-number converter which always returnsUNKNOWN_LINE_NUMBER
static final int
indicates that the line number is unknown -
Method Summary
Modifier and TypeMethodDescriptionint
getLineForOffset
(int offset) Given a raw bytecode offset number, returns the corresponding Java line number.
-
Field Details
-
UNKNOWN_LINE_NUMBER
static final int UNKNOWN_LINE_NUMBERindicates that the line number is unknown- See Also:
-
NOOP_CONVERTER
a do-nothing offset-to-line-number converter which always returnsUNKNOWN_LINE_NUMBER
-
-
Method Details
-
getLineForOffset
int getLineForOffset(int offset) Given a raw bytecode offset number, returns the corresponding Java line number. If there is no exact match for 'offset', returns the previous exact-match line number.- Parameters:
offset
- a raw bytecode offset- Returns:
- the corresponding Java source code line number
-