Package com.android.dx.cf.code
Class LineNumberList
java.lang.Object
com.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.cf.code.LineNumberList
- All Implemented Interfaces:
ToHuman
List of "line number" entries, which are the contents of
LineNumberTable
attributes.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LineNumberList
concat
(LineNumberList list1, LineNumberList list2) Returns an instance which is the concatenation of the two given instances.get
(int n) Gets the indicated item.int
pcToLine
(int pc) Gets the line number associated with the given address.void
set
(int n, int startPc, int lineNumber) Sets the item at the given index.void
set
(int n, LineNumberList.Item item) Sets the item at the given index.Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toString
Methods inherited from class com.android.dx.util.MutabilityControl
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable
-
Field Details
-
EMPTY
non-null;
zero-size instance
-
-
Constructor Details
-
LineNumberList
public LineNumberList(int count) Constructs an instance.- Parameters:
count
- the number of elements to be in the list
-
-
Method Details
-
concat
Returns an instance which is the concatenation of the two given instances.- Parameters:
list1
-non-null;
first instancelist2
-non-null;
second instance- Returns:
non-null;
combined instance
-
get
Gets the indicated item.- Parameters:
n
->= 0;
which item- Returns:
null-ok;
the indicated item
-
set
Sets the item at the given index.- Parameters:
n
->= 0, < size();
which elementitem
-non-null;
the item
-
set
public void set(int n, int startPc, int lineNumber) Sets the item at the given index.- Parameters:
n
->= 0, < size();
which elementstartPc
->= 0;
start pc of this itemlineNumber
->= 0;
corresponding line number
-
pcToLine
public int pcToLine(int pc) Gets the line number associated with the given address.- Parameters:
pc
->= 0;
the address to look up- Returns:
>= -1;
the associated line number, or-1
if none is known
-