Class StackTraceUtils

java.lang.Object
org.springframework.integration.util.StackTraceUtils

public final class StackTraceUtils extends Object
Utility methods for analyzing stack traces.
Since:
3.0
Author:
Gary Russell
  • Method Details

    • isFrameContainingXBeforeFrameContainingY

      public static boolean isFrameContainingXBeforeFrameContainingY(String firstClass, String secondClass, StackTraceElement[] stackTrace)
      Traverses the stack trace element array looking for instances that contain the first or second Strings in the className property.
      Parameters:
      firstClass - The first class to look for.
      secondClass - The second class to look for.
      stackTrace - The stack trace.
      Returns:
      true if the first class appears first, false if the second appears first
      Throws:
      IllegalArgumentException - if neither class is found.