Class CallStackReader
- java.lang.Object
-
- nonapi.io.github.classgraph.classpath.CallStackReader
-
class CallStackReader extends java.lang.Object
A class to find the unique ordered classpath elements.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ReflectionUtils
reflectionUtils
-
Constructor Summary
Constructors Constructor Description CallStackReader(ReflectionUtils reflectionUtils)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Class<?>[]
getCallStackViaSecurityManager(LogNode log)
Get the call stack via the SecurityManager.getClassContext() native method.private static java.lang.Class<?>[]
getCallStackViaStackWalker()
Get the call stack via the StackWalker API (JRE 9+).(package private) java.lang.Class<?>[]
getClassContext(LogNode log)
Get the class context.
-
-
-
Field Detail
-
reflectionUtils
ReflectionUtils reflectionUtils
-
-
Constructor Detail
-
CallStackReader
public CallStackReader(ReflectionUtils reflectionUtils)
Constructor.
-
-
Method Detail
-
getCallStackViaStackWalker
private static java.lang.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 java.lang.Class<?>[] getCallStackViaSecurityManager(LogNode log)
Get the call stack via the SecurityManager.getClassContext() native method.- Parameters:
log
- the log- Returns:
- the call stack.
-
getClassContext
java.lang.Class<?>[] getClassContext(LogNode log)
Get the class context.- Parameters:
log
- the log- Returns:
- The classes in the call stack.
-
-