Package org.jf.dexlib2.base
Class BaseExceptionHandler
- java.lang.Object
-
- org.jf.dexlib2.base.BaseExceptionHandler
-
- All Implemented Interfaces:
java.lang.Comparable<ExceptionHandler>,ExceptionHandler
- Direct Known Subclasses:
BuilderExceptionHandler,BuilderExceptionHandler,DexBackedExceptionHandler,ExceptionHandlerRewriter.RewrittenExceptionHandler,ImmutableExceptionHandler
public abstract class BaseExceptionHandler extends java.lang.Object implements ExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<ExceptionHandler>BY_EXCEPTION
-
Constructor Summary
Constructors Constructor Description BaseExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ExceptionHandler o)Compare this ExceptionHandler to another ExceptionHandler.booleanequals(java.lang.Object o)Compares this ExceptionHandler to another ExceptionHandler for equality.TypeReferencegetExceptionTypeReference()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, wait
-
Methods inherited from interface org.jf.dexlib2.iface.ExceptionHandler
getExceptionType, getHandlerCodeAddress
-
-
-
-
Field Detail
-
BY_EXCEPTION
public static final java.util.Comparator<ExceptionHandler> BY_EXCEPTION
-
-
Method Detail
-
getExceptionTypeReference
@Nullable public TypeReference 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 classjava.lang.Object- Returns:
- The hash code value for this ExceptionHandler
-
equals
public boolean equals(@Nullable java.lang.Object o)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 classjava.lang.Object- Parameters:
o- The object to be compared for equality with this ExceptionHandler- Returns:
- true if the specified object is equal to this ExceptionHandler
-
compareTo
public int compareTo(@Nonnull ExceptionHandler o)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 interfacejava.lang.Comparable<ExceptionHandler>- Specified by:
compareToin interfaceExceptionHandler- Parameters:
o- The ExceptionHandler to compare with this ExceptionHandler- Returns:
- An integer representing the result of the comparison
-
-