Class StackUtils


  • public final class StackUtils
    extends java.lang.Object
    Utility for obtaining source file reference on method call. Used internally to track test extensions registration (to show navigation links in the debug report).
    Since:
    06.03.2025
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<java.lang.StackWalker.StackFrame> getCaller​(java.util.List<java.lang.Class<?>> skip)  
      static java.lang.String getCallerSource​(java.util.List<java.lang.Class<?>> skip)  
      static java.lang.String getSharedStateSource()  
      • Methods inherited from class java.lang.Object

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

      • getCaller

        public static java.util.Optional<java.lang.StackWalker.StackFrame> getCaller​(java.util.List<java.lang.Class<?>> skip)
        Parameters:
        skip - classes to skip in stack
        Returns:
        caller stack frame
      • getCallerSource

        public static java.lang.String getCallerSource​(java.util.List<java.lang.Class<?>> skip)
        Parameters:
        skip - classes to skip in stack
        Returns:
        formatted caller source
      • getSharedStateSource

        public static java.lang.String getSharedStateSource()
        Returns:
        shared state calling source