Class ThrowableProxyHelper
java.lang.Object
org.apache.logging.log4j.core.impl.ThrowableProxyHelper
ThrowableProxyHelper
provides utilities required to initialize a new ThrowableProxy
instance.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Cached StackTracePackageElement and ClassLoader. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Class<?>
loadClass
(ClassLoader lastLoader, String className) Loads classes not located via Reflection.getCallerClass.private static Class<?>
private static ThrowableProxyHelper.CacheEntry
toCacheEntry
(Class<?> callerClass, boolean exact) Construct the CacheEntry from the Class's information.(package private) static ExtendedStackTraceElement[]
toExtendedStackTrace
(ThrowableProxy src, Deque<Class<?>> stack, Map<String, ThrowableProxyHelper.CacheEntry> map, StackTraceElement[] rootTrace, StackTraceElement[] stackTrace) Resolve all the stack entries in this stack trace that are not common with the parent.(package private) static ThrowableProxy[]
toSuppressedProxies
(Throwable thrown, Set<Throwable> suppressedVisited)
-
Constructor Details
-
ThrowableProxyHelper
private ThrowableProxyHelper()
-
-
Method Details
-
toExtendedStackTrace
static ExtendedStackTraceElement[] toExtendedStackTrace(ThrowableProxy src, Deque<Class<?>> stack, Map<String, ThrowableProxyHelper.CacheEntry> map, StackTraceElement[] rootTrace, StackTraceElement[] stackTrace) Resolve all the stack entries in this stack trace that are not common with the parent.- Parameters:
src
- Instance for which to build an extended stack trace.stack
- The callers Class stack.map
- The cache of CacheEntry objects.rootTrace
- The first stack trace resolve or null.stackTrace
- The stack trace being resolved.- Returns:
- The StackTracePackageElement array.
-
toSuppressedProxies
-
toCacheEntry
Construct the CacheEntry from the Class's information.- Parameters:
callerClass
- The Class.exact
- True if the class was obtained via Reflection.getCallerClass.- Returns:
- The CacheEntry.
-
loadClass
Loads classes not located via Reflection.getCallerClass.- Parameters:
lastLoader
- The ClassLoader that loaded the Class that called this Class.className
- The name of the Class.- Returns:
- The Class object for the Class or null if it could not be located.
-
loadClass
-