Class ClasspathFinder
java.lang.Object
nonapi.io.github.classgraph.classpath.ClasspathFinder
A class to find the unique ordered classpath elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ClassLoader[]The default order in which ClassLoaders are called to load classes, respecting parent-first/parent-last delegation order.private final ClasspathOrderThe classpath order.private ClassGraphClassLoaderIf 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).private final ModuleFinderTheModuleFinder, if modules are to be scanned. -
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.
-
Field Details
-
classpathOrder
The classpath order. -
moduleFinder
TheModuleFinder, if modules are to be scanned. -
classLoaderOrderRespectingParentDelegation
The default order in which ClassLoaders are called to load classes, respecting parent-first/parent-last delegation order. -
delegateClassGraphClassLoader
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).
-
-
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).
-