Class PrivateSecurityManagerStackTraceUtil


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

      • PrivateSecurityManagerStackTraceUtil

        private PrivateSecurityManagerStackTraceUtil()
    • Method Detail

      • isEnabled

        static boolean isEnabled()
      • getCurrentStackTrace

        static java.util.Deque<java.lang.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.