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
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether or not this instance ends with a "catch-all" handler.intcompareTo(CatchHandlerList other) get(int n) Gets the element at the given index.voidset(int n, CatchHandlerList.Entry entry) Sets the entry at the given index.voidSets 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 FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toString, toStringMethods inherited from class 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:
toHumanin interfaceToHuman- Overrides:
toHumanin classFixedSizeList- Returns:
non-null;the human string form
-
toHuman
-
catchesAll
public boolean catchesAll()Returns whether or not this instance ends with a "catch-all" handler.- Returns:
trueif this instance ends with a "catch-all" handler orfalseif 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:
compareToin interfaceComparable<CatchHandlerList>
-