Class ThrowableProxyHelper
- java.lang.Object
-
- org.apache.logging.log4j.core.impl.ThrowableProxyHelper
-
class ThrowableProxyHelper extends java.lang.ObjectThrowableProxyHelperprovides utilities required to initialize a newThrowableProxyinstance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classThrowableProxyHelper.CacheEntryCached StackTracePackageElement and ClassLoader.
-
Constructor Summary
Constructors Modifier Constructor Description privateThrowableProxyHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.Class<?>loadClass(java.lang.ClassLoader lastLoader, java.lang.String className)Loads classes not located via Reflection.getCallerClass.private static java.lang.Class<?>loadClass(java.lang.String className)private static ThrowableProxyHelper.CacheEntrytoCacheEntry(java.lang.Class<?> callerClass, boolean exact)Construct the CacheEntry from the Class's information.(package private) static ExtendedStackTraceElement[]toExtendedStackTrace(ThrowableProxy src, java.util.Deque<java.lang.Class<?>> stack, java.util.Map<java.lang.String,ThrowableProxyHelper.CacheEntry> map, java.lang.StackTraceElement[] rootTrace, java.lang.StackTraceElement[] stackTrace)Resolve all the stack entries in this stack trace that are not common with the parent.(package private) static ThrowableProxy[]toSuppressedProxies(java.lang.Throwable thrown, java.util.Set<java.lang.Throwable> suppressedVisited)
-
-
-
Method Detail
-
toExtendedStackTrace
static ExtendedStackTraceElement[] toExtendedStackTrace(ThrowableProxy src, java.util.Deque<java.lang.Class<?>> stack, java.util.Map<java.lang.String,ThrowableProxyHelper.CacheEntry> map, java.lang.StackTraceElement[] rootTrace, java.lang.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
static ThrowableProxy[] toSuppressedProxies(java.lang.Throwable thrown, java.util.Set<java.lang.Throwable> suppressedVisited)
-
toCacheEntry
private static ThrowableProxyHelper.CacheEntry toCacheEntry(java.lang.Class<?> callerClass, boolean exact)
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
private static java.lang.Class<?> loadClass(java.lang.ClassLoader lastLoader, java.lang.String className)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
private static java.lang.Class<?> loadClass(java.lang.String className)
-
-