Class CallStackReader
java.lang.Object
nonapi.io.github.classgraph.classpath.CallStackReader
A class to find the unique ordered classpath elements.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Class<?>[]
Get the call stack via the SecurityManager.getClassContext() native method.private static Class<?>[]
Get the call stack via the StackWalker API (JRE 9+).(package private) Class<?>[]
getClassContext
(LogNode log) Get the class context.
-
Field Details
-
reflectionUtils
ReflectionUtils reflectionUtils
-
-
Constructor Details
-
CallStackReader
Constructor.
-
-
Method Details
-
getCallStackViaStackWalker
Get the call stack via the StackWalker API (JRE 9+).- Returns:
- the call stack, or null if it could not be obtained.
-
getCallStackViaSecurityManager
Get the call stack via the SecurityManager.getClassContext() native method.- Parameters:
log
- the log- Returns:
- the call stack.
-
getClassContext
Get the class context.- Parameters:
log
- the log- Returns:
- The classes in the call stack.
-