Class ThrowableProxyHelper

java.lang.Object
org.apache.logging.log4j.core.impl.ThrowableProxyHelper

class ThrowableProxyHelper extends Object
ThrowableProxyHelper provides utilities required to initialize a new ThrowableProxy instance.
  • 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

      static ThrowableProxy[] toSuppressedProxies(Throwable thrown, Set<Throwable> suppressedVisited)
    • toCacheEntry

      private static ThrowableProxyHelper.CacheEntry toCacheEntry(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 Class<?> loadClass(ClassLoader lastLoader, 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 Class<?> loadClass(String className)