Package proguard.classfile.attribute
Class StructuredLineNumberInfo
- java.lang.Object
-
- proguard.classfile.attribute.LineNumberInfo
-
- proguard.classfile.attribute.StructuredLineNumberInfo
-
public class StructuredLineNumberInfo extends LineNumberInfo
Line number info with extra information for lines that came from a different source than the current method (e.g. inlined from a different method). Tracking this information is necessary for printing a correct mapping file.The structured line number info contains:
- Source string indicating the originating class/method of the line.
- Optional start/end line number indicating the original line numbers for a block of inlined instructions.
- A list of origins, indicating the transformations these lines underwent, e.g. multiple levels of inlining
- A block ID, that identifies a group of lines that belongs to a singular block.
Since these transformations operate on blocks of lines, and the mapping file identifies blocks rather than singular lines,
StructuredLineNumberInfo
objects are generated through aStructuredLineNumberInfo.Block
object, which is a factory object that generatesStructuredLineNumberInfo
s with consistent block IDs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StructuredLineNumberInfo.Block
Factory forStructuredLineNumberInfo
objects.static interface
StructuredLineNumberInfo.Origin
static class
StructuredLineNumberInfo.SimpleOrigin
-
Field Summary
-
Fields inherited from class proguard.classfile.attribute.LineNumberInfo
u2lineNumber, u2startPC
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StructuredLineNumberInfo.Block
getBlock(StructuredLineNumberInfo.Origin... addedOrigins)
int
getBlockId()
Get the block ID which identifies related line numbers which form a single block in the mapping file.java.util.List<StructuredLineNumberInfo.Origin>
getOrigin()
Get a chronological list of manipulations that this line went through.java.lang.String
getSource()
Returns a description of the source of the line, if known, or null otherwise.int
getSourceLineEnd()
int
getSourceLineStart()
java.lang.String
getSourceMethod()
-
-
-
Method Detail
-
getSourceMethod
public java.lang.String getSourceMethod()
-
getSourceLineStart
public int getSourceLineStart()
-
getSourceLineEnd
public int getSourceLineEnd()
-
getBlockId
public int getBlockId()
Get the block ID which identifies related line numbers which form a single block in the mapping file.
-
getOrigin
public java.util.List<StructuredLineNumberInfo.Origin> getOrigin()
Get a chronological list of manipulations that this line went through. True origin is the first element, followed by any subsequent manipulations (e.g. multiple levels of inlining, copying, etc.).
-
getSource
public java.lang.String getSource()
Description copied from class:LineNumberInfo
Returns a description of the source of the line, if known, or null otherwise. Standard line number entries don't contain information about their source; it is assumed to be the same source file.- Overrides:
getSource
in classLineNumberInfo
-
getBlock
public StructuredLineNumberInfo.Block getBlock(StructuredLineNumberInfo.Origin... addedOrigins)
-
-