Package com.android.dx.dex.code
Class CatchHandlerList
java.lang.Object
com.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.dex.code.CatchHandlerList
- All Implemented Interfaces:
ToHuman
,Comparable<CatchHandlerList>
Ordered list of (exception type, handler address) entries.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether or not this instance ends with a "catch-all" handler.int
compareTo
(CatchHandlerList other) get
(int n) Gets the element at the given index.void
set
(int n, CatchHandlerList.Entry entry) Sets the entry at the given index.void
Sets the entry at the given index.toHuman()
Return the "human" string form of this instance.Get the human form of this instance, prefixed on each line with the string.Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, 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
-
CatchHandlerList
public CatchHandlerList(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
-
toHuman
Return the "human" string form of this instance. This is generally less "debuggy" thantoString()
. This method will only work if every element of the list implementsToHuman
.- Specified by:
toHuman
in interfaceToHuman
- Overrides:
toHuman
in classFixedSizeList
- Returns:
non-null;
the human string form
-
toHuman
Get the human form of this instance, prefixed on each line with the string.- Parameters:
prefix
-non-null;
the prefix for every lineheader
-non-null;
the header for the first line (after the first prefix)- Returns:
non-null;
the human form
-
catchesAll
public boolean catchesAll()Returns whether or not this instance ends with a "catch-all" handler.- Returns:
true
if this instance ends with a "catch-all" handler orfalse
if not
-
set
Sets the entry at the given index.- Parameters:
n
->= 0, < size();
which indexexceptionType
-non-null;
type of exception handledhandler
->= 0;
exception handler address
-
set
Sets the entry at the given index.- Parameters:
n
->= 0, < size();
which indexentry
-non-null;
the entry to set atn
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CatchHandlerList>
-