Class PrivateSecurityManagerStackTraceUtil

java.lang.Object
org.apache.logging.log4j.util.PrivateSecurityManagerStackTraceUtil

final class PrivateSecurityManagerStackTraceUtil extends Object
Internal utility to share a fast implementation of #getCurrentStackTrace() with the java 9 implementation of StackLocator.
  • Field Details

  • Constructor Details

    • PrivateSecurityManagerStackTraceUtil

      private PrivateSecurityManagerStackTraceUtil()
  • Method Details

    • isEnabled

      static boolean isEnabled()
    • getCurrentStackTrace

      static Deque<Class<?>> getCurrentStackTrace()
      Returns the current execution stack as a Deque of classes.

      The size of the Deque is the number of methods on the execution stack. The first element is the class that started execution on this thread, the next element is the class that was called next, and so on, until the last element: the method that called SecurityManager.getClassContext() to capture the stack.

      Returns:
      the execution stack.