Class PositionList
java.lang.Object
com.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.dex.code.PositionList
- All Implemented Interfaces:
ToHuman
List of source position entries. This class includes a utility
method to extract an instance out of a
DalvInsnList.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PositionListnon-null;empty instancestatic final intconstant formake(DalvInsnList, int)to indicate that only "important" position information should be returned.static final intconstant formake(DalvInsnList, int)to indicate that only line number transitions should be returnedstatic final intconstant formake(DalvInsnList, int)to indicate that no actual position information should be returned -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int n) Gets the element at the given index.static PositionListmake(DalvInsnList insns, int howMuch) Extracts and returns the source position information out of an instruction list.voidset(int n, PositionList.Entry entry) Sets the entry 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;empty instance -
NONE
public static final int NONEconstant formake(DalvInsnList, int)to indicate that no actual position information should be returned- See Also:
-
LINES
public static final int LINESconstant formake(DalvInsnList, int)to indicate that only line number transitions should be returned- See Also:
-
IMPORTANT
public static final int IMPORTANTconstant formake(DalvInsnList, int)to indicate that only "important" position information should be returned. This includes block starts and instructions that might throw.- See Also:
-
-
Constructor Details
-
PositionList
public PositionList(int size) Constructs an instance. All indices initially containnull.- Parameters:
size->= 0;the size of the list
-
-
Method Details
-
make
Extracts and returns the source position information out of an instruction list.- Parameters:
insns-non-null;instructions to converthowMuch- how much information should be included; one of the static constants defined by this class- Returns:
non-null;the positions list
-
get
Gets the element at the given index. It is an error to call this with the index for an element which was never set; if you do that, this will throwNullPointerException.- Parameters:
n->= 0, < size();which index- Returns:
non-null;element at that index
-
set
Sets the entry at the given index.- Parameters:
n->= 0, < size();which indexentry-non-null;the entry to set atn
-