Package com.android.dx.dex.code
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final PositionList
non-null;
empty instancestatic final int
constant formake(com.android.dx.dex.code.DalvInsnList, int)
to indicate that only "important" position information should be returned.static final int
constant formake(com.android.dx.dex.code.DalvInsnList, int)
to indicate that only line number transitions should be returnedstatic final int
constant formake(com.android.dx.dex.code.DalvInsnList, int)
to indicate that no actual position information should be returned -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(int n) Gets the element at the given index.static PositionList
make
(DalvInsnList insns, int howMuch) Extracts and returns the source position information out of an instruction list.void
set
(int n, PositionList.Entry entry) Sets the entry 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;
empty instance -
NONE
public static final int NONEconstant formake(com.android.dx.dex.code.DalvInsnList, int)
to indicate that no actual position information should be returned- See Also:
-
LINES
public static final int LINESconstant formake(com.android.dx.dex.code.DalvInsnList, int)
to indicate that only line number transitions should be returned- See Also:
-
IMPORTANT
public static final int IMPORTANTconstant formake(com.android.dx.dex.code.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
-