Package org.jf.dexlib2.base
Class BaseExceptionHandler
java.lang.Object
org.jf.dexlib2.base.BaseExceptionHandler
- All Implemented Interfaces:
Comparable<ExceptionHandler>,ExceptionHandler
- Direct Known Subclasses:
BuilderExceptionHandler,BuilderExceptionHandler,DexBackedExceptionHandler,ExceptionHandlerRewriter.RewrittenExceptionHandler,ImmutableExceptionHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompare this ExceptionHandler to another ExceptionHandler.booleanCompares this ExceptionHandler to another ExceptionHandler for equality.Gets the type of exception that is handled by this handler.inthashCode()Returns a hashcode for this ExceptionHandler.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jf.dexlib2.iface.ExceptionHandler
getExceptionType, getHandlerCodeAddress
-
Field Details
-
BY_EXCEPTION
-
-
Constructor Details
-
BaseExceptionHandler
public BaseExceptionHandler()
-
-
Method Details
-
getExceptionTypeReference
Description copied from interface:ExceptionHandlerGets the type of exception that is handled by this handler.- Specified by:
getExceptionTypeReferencein interfaceExceptionHandler- Returns:
- A TypeReference to the type of exception that is handled by this handler, or null if this is a catch-all handler.
-
hashCode
public int hashCode()Description copied from interface:ExceptionHandlerReturns a hashcode for this ExceptionHandler. This hashCode is defined to be the following:String exceptionType = getExceptionType(); int hashCode = exceptionType==null?0:exceptionType.hashCode(); return hashCode*31 + getHandlerCodeAddress();- Specified by:
hashCodein interfaceExceptionHandler- Overrides:
hashCodein classObject- Returns:
- The hash code value for this ExceptionHandler
-
equals
Description copied from interface:ExceptionHandlerCompares this ExceptionHandler to another ExceptionHandler for equality. This ExceptionHandler is equal to another ExceptionHandler if all of it's "fields" are equal. That is, if the return values of getExceptionType() and getHandlerCodeAddress() are both equal.- Specified by:
equalsin interfaceExceptionHandler- Overrides:
equalsin classObject- Parameters:
o- The object to be compared for equality with this ExceptionHandler- Returns:
- true if the specified object is equal to this ExceptionHandler
-
compareTo
Description copied from interface:ExceptionHandlerCompare this ExceptionHandler to another ExceptionHandler. The comparison is based on the comparison of the return values of getExceptionType() and getHandlerCodeAddress() in that order. A null value for getExceptionType() compares after a non-null value.- Specified by:
compareToin interfaceComparable<ExceptionHandler>- Specified by:
compareToin interfaceExceptionHandler- Parameters:
o- The ExceptionHandler to compare with this ExceptionHandler- Returns:
- An integer representing the result of the comparison
-