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
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LineNumberListconcat(LineNumberList list1, LineNumberList list2) Returns an instance which is the concatenation of the two given instances.get(int n) Gets the indicated item.intpcToLine(int pc) Gets the line number associated with the given address.voidset(int n, int startPc, int lineNumber) Sets the item at the given index.voidset(int n, LineNumberList.Item item) Sets the item at the given index.Methods inherited from class FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toStringMethods inherited from class 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-1if none is known
-