Class StackUtils


  • public class StackUtils
    extends Object
    • Method Detail

      • wasInvokedFrom

        public static boolean wasInvokedFrom​(String className,
                                             String methodName,
                                             int limit)
        Checks whether current method was invoked from the given class and method.
      • wasInvokedFrom

        public static boolean wasInvokedFrom​(BiPredicate<String,​String> predicate,
                                             int limit)
        Checks whether current method was invoked from a class and method using the given predicate, which gets the class name of the stack frame as first parameter and the method name as second parameter.