org.springframework.boot.diagnostics

Class AbstractFailureAnalyzer<T extends java.lang.Throwable>

  • java.lang.Object
    • org.springframework.boot.diagnostics.AbstractFailureAnalyzer<T>
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      FailureAnalysis analyze(java.lang.Throwable failure)
      Returns an analysis of the given failure, or null if no analysis was possible.
      protected abstract FailureAnalysis analyze(java.lang.Throwable rootFailure, T cause)
      Returns an analysis of the given rootFailure, or null if no analysis was possible.
      protected <E extends java.lang.Throwable>
      E
      findCause(java.lang.Throwable failure, java.lang.Class<E> type) 
      protected java.lang.Class<? extends T> getCauseType()
      Return the cause type being handled by the analyzer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractFailureAnalyzer

        public AbstractFailureAnalyzer()
    • Method Detail

      • analyze

        public FailureAnalysis analyze(java.lang.Throwable failure)
        Description copied from interface: FailureAnalyzer
        Returns an analysis of the given failure, or null if no analysis was possible.
        Specified by:
        analyze in interface FailureAnalyzer
        Parameters:
        failure - the failure
        Returns:
        the analysis or null
      • analyze

        protected abstract FailureAnalysis analyze(java.lang.Throwable rootFailure,
                                                   T cause)
        Returns an analysis of the given rootFailure, or null if no analysis was possible.
        Parameters:
        rootFailure - the root failure passed to the analyzer
        cause - the actual found cause
        Returns:
        the analysis or null
      • getCauseType

        protected java.lang.Class<? extends T> getCauseType()
        Return the cause type being handled by the analyzer. By default the class generic is used.
        Returns:
        the cause type
      • findCause

        protected final <E extends java.lang.Throwable> E findCause(java.lang.Throwable failure,
                                                                    java.lang.Class<E> type)