Class ClasspathFinder
java.lang.Object
nonapi.io.github.classgraph.classpath.ClasspathFinder
A class to find the unique ordered classpath elements.
-
Constructor Summary
ConstructorsConstructorDescriptionClasspathFinder(ScanSpec scanSpec, ReflectionUtils reflectionUtils, LogNode log) A class to find the unique ordered classpath elements. -
Method Summary
Modifier and TypeMethodDescriptionGet the ClassLoader order, respecting parent-first/parent-last delegation order.Get the classpath order.If one of the classloaders that was found was an existing instance ofClassGraphClassLoader, then delegate to that classloader first rather than trying to load from theClassGraphClassLoaderof the current scan, so that classes are compatible between nested scans (#485).Get theModuleFinder.
-
Constructor Details
-
ClasspathFinder
A class to find the unique ordered classpath elements.- Parameters:
scanSpec- TheScanSpec.log- The log.
-
-
Method Details
-
getClasspathOrder
Get the classpath order.- Returns:
- The order of raw classpath elements obtained from ClassLoaders.
-
getModuleFinder
-
getClassLoaderOrderRespectingParentDelegation
Get the ClassLoader order, respecting parent-first/parent-last delegation order.- Returns:
- the class loader order.
-
getDelegateClassGraphClassLoader
If one of the classloaders that was found was an existing instance ofClassGraphClassLoader, then delegate to that classloader first rather than trying to load from theClassGraphClassLoaderof the current scan, so that classes are compatible between nested scans (#485).- Returns:
- the
ClassGraphClassLoaderto delegate to before loading classes with this scan's ownClassGraphClassLoader(or null if none).
-