Package edu.umd.cs.findbugs.ba
Class LineNumberMap
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.LineNumberMap
-
public class LineNumberMap extends java.lang.ObjectSummarize line numbers (and other source information) for a method.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUGSet this property to true to get debug print statements.private booleanhasLineNumbersprivate static booleanLINE_NUMBER_BUGWhen this is true, the workaround for the bug in BCEL 5.0's LineNumberTable class is disabled.private java.util.IdentityHashMap<org.apache.bcel.generic.InstructionHandle,org.apache.bcel.classfile.LineNumber>lineNumberMapprivate org.apache.bcel.generic.MethodGenmethodGen
-
Constructor Summary
Constructors Constructor Description LineNumberMap(org.apache.bcel.generic.MethodGen methodGen)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild()Build the line number information.private voidcheckTable(org.apache.bcel.classfile.LineNumberTable table)booleanhasLineNumbers()Does this method have line number information?org.apache.bcel.classfile.LineNumberlookupLineNumber(org.apache.bcel.generic.InstructionHandle handle)Find the line number information for instruction whose handle is given.
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
Set this property to true to get debug print statements.
-
LINE_NUMBER_BUG
private static final boolean LINE_NUMBER_BUG
When this is true, the workaround for the bug in BCEL 5.0's LineNumberTable class is disabled.
-
methodGen
private final org.apache.bcel.generic.MethodGen methodGen
-
lineNumberMap
private final java.util.IdentityHashMap<org.apache.bcel.generic.InstructionHandle,org.apache.bcel.classfile.LineNumber> lineNumberMap
-
hasLineNumbers
private boolean hasLineNumbers
-
-
Method Detail
-
build
public void build()
Build the line number information. Should be called before any other methods.
-
checkTable
private void checkTable(org.apache.bcel.classfile.LineNumberTable table)
-
hasLineNumbers
public boolean hasLineNumbers()
Does this method have line number information?
-
lookupLineNumber
public org.apache.bcel.classfile.LineNumber lookupLineNumber(org.apache.bcel.generic.InstructionHandle handle)
Find the line number information for instruction whose handle is given.- Parameters:
handle- the InstructionHandle- Returns:
- the LineNumber object containing bytecode offset and source line number
-
-