パッケージ org.springframework.core

クラス ExceptionDepthComparator

java.lang.ObjectSE
org.springframework.core.ExceptionDepthComparator
実装されたすべてのインターフェース:
ComparatorSE<ClassSE<? extends ThrowableSE>>

public class ExceptionDepthComparator extends ObjectSE implements ComparatorSE<ClassSE<? extends ThrowableSE>>
スローされた例外型からの深さに基づいて例外をソートできるコンパレータ。
導入:
3.0.3
作成者:
Juergen Hoeller, Arjen Poutsma
  • コンストラクターの詳細

    • ExceptionDepthComparator

      public ExceptionDepthComparator(ThrowableSE exception)
      指定された例外の新しい ExceptionDepthComparator を作成します。
      パラメーター:
      exception - 深度でソートするときに比較するターゲット例外
    • ExceptionDepthComparator

      public ExceptionDepthComparator(ClassSE<? extends ThrowableSE> exceptionType)
      指定された例外型の新しい ExceptionDepthComparator を作成します。
      パラメーター:
      exceptionType - 深度でソートするときに比較するターゲット例外型
  • メソッドの詳細

    • compare

      public int compare(ClassSE<? extends ThrowableSE> o1, ClassSE<? extends ThrowableSE> o2)
      次で指定:
      インターフェース ComparatorSE<ClassSE<? extends ThrowableSE>>compareSE 
    • findClosestMatch

      public static ClassSE<? extends ThrowableSE> findClosestMatch(CollectionSE<ClassSE<? extends ThrowableSE>> exceptionTypes, ThrowableSE targetException)
      特定のターゲット例外の特定の例外型から最も近い一致を取得します。
      パラメーター:
      exceptionTypes - 例外型のコレクション
      targetException - 一致を見つけるターゲット例外
      戻り値:
      指定されたコレクションから最も近い例外型