Package com.android.dx.dex.code
Class LocalList
java.lang.Object
com.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.dex.code.LocalList
- All Implemented Interfaces:
ToHuman
List of local variables. Each local variable entry indicates a
range of code which it is valid for, a register number, a name,
and a type.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Disposition of a local entry.static class
Entry in a local list.static class
Intermediate state when constructing a local list. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
debugPrint
(PrintStream out, String prefix) Does a human-friendly dump of this instance.get
(int n) Gets the element at the given index.static LocalList
make
(DalvInsnList insns) Constructs an instance for the given method, based on the given block order and intermediate local information.void
set
(int n, LocalList.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
-
-
Constructor Details
-
LocalList
public LocalList(int size) Constructs an instance. All indices initially containnull
.- Parameters:
size
->= 0;
the size of the list
-
-
Method Details
-
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
-
debugPrint
Does a human-friendly dump of this instance.- Parameters:
out
-non-null;
where to dumpprefix
-non-null;
prefix to attach to each line of output
-
make
Constructs an instance for the given method, based on the given block order and intermediate local information.- Parameters:
insns
-non-null;
instructions to convert- Returns:
non-null;
the constructed list
-