Class CallStackReader

java.lang.Object
nonapi.io.github.classgraph.classpath.CallStackReader

class CallStackReader extends Object
A class to find the unique ordered classpath elements.
  • Field Details

  • Constructor Details

    • CallStackReader

      public CallStackReader(ReflectionUtils reflectionUtils)
      Constructor.
  • Method Details

    • getCallStackViaStackWalker

      private static Class<?>[] getCallStackViaStackWalker()
      Get the call stack via the StackWalker API (JRE 9+).
      Returns:
      the call stack, or null if it could not be obtained.
    • getCallStackViaSecurityManager

      private static Class<?>[] getCallStackViaSecurityManager(LogNode log)
      Get the call stack via the SecurityManager.getClassContext() native method.
      Parameters:
      log - the log
      Returns:
      the call stack.
    • getClassContext

      Class<?>[] getClassContext(LogNode log)
      Get the class context.
      Parameters:
      log - the log
      Returns:
      The classes in the call stack.