Top Description Inners Fields Constructors Methods
org.apache.logging.log4j.util

pack-priv final Class PrivateSecurityManagerStackTraceUtil

extends Object
Class Inheritance
Imports
java.util.ArrayDeque, .Collections, .Deque

Internal utility to share a fast implementation of #getCurrentStackTrace() with the java 9 implementation of StackLocator.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
PrivateSecurityManagerStackTraceUtil.PrivateSecurityManager

References Deprecated SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

Field Summary

Modifier and TypeField and Description
private static final PrivateSecurityManagerStackTraceUtil.PrivateSecurityManager
SECURITY_MANAGER

References Deprecated PrivateSecurityManagerStackTraceUtil.PrivateSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static Deque<Class<?>>

Returns:

the execution stack.
getCurrentStackTrace
()

Returns the current execution stack as a Deque of classes.

pack-priv static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SECURITY_MANAGERback to summary
private static final PrivateSecurityManagerStackTraceUtil.PrivateSecurityManager SECURITY_MANAGER

References Deprecated

PrivateSecurityManagerStackTraceUtil.PrivateSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Detail

PrivateSecurityManagerStackTraceUtilback to summary
private PrivateSecurityManagerStackTraceUtil()

Method Detail

getCurrentStackTraceback to summary
pack-priv 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:Deque<Class<?>>

the execution stack.

isEnabledback to summary
pack-priv static boolean isEnabled()
org.apache.logging.log4j.util back to summary

private final Class PrivateSecurityManagerStackTraceUtil.PrivateSecurityManager

extends SecurityManager
Class Inheritance

References Deprecated

SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected Class<?>[]
getClassContext()

Overrides java.lang.SecurityManager.getClassContext.

Returns the current execution stack as an array of classes.

Inherited from java.lang.SecurityManager:
checkAcceptcheckAccesscheckAccesscheckConnectcheckConnectcheckCreateClassLoadercheckDeletecheckExeccheckExitcheckLinkcheckListencheckMulticastcheckMulticastcheckPackageAccesscheckPackageDefinitioncheckPermissioncheckPermissioncheckPrintJobAccesscheckPropertiesAccesscheckPropertyAccesscheckReadcheckReadcheckReadcheckSecurityAccesscheckSetFactorycheckWritecheckWritegetSecurityContextgetThreadGroup

Constructor Detail

PrivateSecurityManagerback to summary
private PrivateSecurityManager()

Method Detail

getClassContextback to summary
protected Class<?>[] getClassContext()

Overrides java.lang.SecurityManager.getClassContext.

Doc from java.lang.SecurityManager.getClassContext.

Returns the current execution stack as an array of classes.

The length of the array is the number of methods on the execution stack. The element at index 0 is the class of the currently executing method, the element at index 1 is the class of that method's caller, and so on.

Returns:Class<?>[]

the execution stack.

Annotations
@Override