Class StackTraceUtility


  • public class StackTraceUtility
    extends Object
    Records and process the stack trace so a developer's logger can (1) test against it, and (2) display it. If the "enabled" flag is not set, no processing is done, and the stack trace is empty. That way, there is essentially no overhead in creating a disabled instance.
    • Constructor Detail

      • StackTraceUtility

        public StackTraceUtility​(Class<?> lowestClassInStackTrace,
                                 boolean enabled)
    • Method Detail

      • passesStackRestriction

        public boolean passesStackRestriction​(String restriction)
      • passesStackRestriction

        public boolean passesStackRestriction​(Pattern restriction)
      • format

        public String format​(boolean requested)
      • getMethodName

        public String getMethodName()