Class BaseExceptionHandler

    • Field Detail

      • BY_EXCEPTION

        public static final java.util.Comparator<ExceptionHandler> BY_EXCEPTION
    • Constructor Detail

      • BaseExceptionHandler

        public BaseExceptionHandler()
    • Method Detail

      • getExceptionTypeReference

        @Nullable
        public TypeReference getExceptionTypeReference()
        Description copied from interface: ExceptionHandler
        Gets the type of exception that is handled by this handler.
        Specified by:
        getExceptionTypeReference in interface ExceptionHandler
        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: ExceptionHandler
        Returns 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:
        hashCode in interface ExceptionHandler
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code value for this ExceptionHandler
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Description copied from interface: ExceptionHandler
        Compares 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:
        equals in interface ExceptionHandler
        Overrides:
        equals in class java.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: ExceptionHandler
        Compare 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:
        compareTo in interface java.lang.Comparable<ExceptionHandler>
        Specified by:
        compareTo in interface ExceptionHandler
        Parameters:
        o - The ExceptionHandler to compare with this ExceptionHandler
        Returns:
        An integer representing the result of the comparison