Top Description Fields Constructors Methods
nonapi.io.github.classgraph.classpath

public Class ClasspathFinder

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Map.Entry, .Set, io.github.classgraph.ClassGraphClassLoader, nonapi.io.github.classgraph.classloaderhandler.ClassLoaderHandlerRegistry, .ClassLoaderHandlerRegistry.ClassLoaderHandlerRegistryEntry, nonapi.io.github.classgraph.reflection.ReflectionUtils, nonapi.io.github.classgraph.scanspec.ScanSpec, nonapi.io.github.classgraph.utils.FastPathResolver, .FileUtils, .JarUtils, .LogNode

A class to find the unique ordered classpath elements.

Field Summary

Modifier and TypeField and Description
private ClassLoader[]
classLoaderOrderRespectingParentDelegation

The default order in which ClassLoaders are called to load classes, respecting parent-first/parent-last delegation order.

private final ClasspathOrder
classpathOrder

The classpath order.

private ClassGraphClassLoader
delegateClassGraphClassLoader

If one of the classloaders that was found was an existing instance of ClassGraphClassLoader, then delegate to that classloader first rather than trying to load from the ClassGraphClassLoader of the current scan, so that classes are compatible between nested scans (#485).

private final ModuleFinder
moduleFinder

The ModuleFinder, if modules are to be scanned.

Constructor Summary

AccessConstructor and Description
public
ClasspathFinder(final ScanSpec scanSpec, final ReflectionUtils reflectionUtils, final LogNode
The log.
log
)

A class to find the unique ordered classpath elements.

Method Summary

Modifier and TypeMethod and Description
public ClassLoader[]

Returns:

the class loader order.
getClassLoaderOrderRespectingParentDelegation
()

Get the ClassLoader order, respecting parent-first/parent-last delegation order.

public ClasspathOrder

Returns:

The order of raw classpath elements obtained from ClassLoaders.
getClasspathOrder
()

Get the classpath order.

public ClassGraphClassLoader

Returns:

the ClassGraphClassLoader to delegate to before loading classes with this scan's own ClassGraphClassLoader (or null if none).
getDelegateClassGraphClassLoader
()

If one of the classloaders that was found was an existing instance of ClassGraphClassLoader, then delegate to that classloader first rather than trying to load from the ClassGraphClassLoader of the current scan, so that classes are compatible between nested scans (#485).

public ModuleFinder

Returns:

The ModuleFinder.
getModuleFinder
()

Get the ModuleFinder.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classLoaderOrderRespectingParentDelegationback to summary
private ClassLoader[] classLoaderOrderRespectingParentDelegation

The default order in which ClassLoaders are called to load classes, respecting parent-first/parent-last delegation order.

classpathOrderback to summary
private final ClasspathOrder classpathOrder

The classpath order.

delegateClassGraphClassLoaderback to summary
private ClassGraphClassLoader delegateClassGraphClassLoader

If one of the classloaders that was found was an existing instance of ClassGraphClassLoader, then delegate to that classloader first rather than trying to load from the ClassGraphClassLoader of the current scan, so that classes are compatible between nested scans (#485).

moduleFinderback to summary
private final ModuleFinder moduleFinder

The ModuleFinder, if modules are to be scanned.

Constructor Detail

ClasspathFinderback to summary
public ClasspathFinder(final ScanSpec scanSpec, final ReflectionUtils reflectionUtils, final LogNode log)

A class to find the unique ordered classpath elements.

Parameters
scanSpec:ScanSpec

The ScanSpec.

log:LogNode

The log.

Method Detail

getClassLoaderOrderRespectingParentDelegationback to summary
public ClassLoader[] getClassLoaderOrderRespectingParentDelegation()

Get the ClassLoader order, respecting parent-first/parent-last delegation order.

Returns:ClassLoader[]

the class loader order.

getClasspathOrderback to summary
public ClasspathOrder getClasspathOrder()

Get the classpath order.

Returns:ClasspathOrder

The order of raw classpath elements obtained from ClassLoaders.

getDelegateClassGraphClassLoaderback to summary
public ClassGraphClassLoader getDelegateClassGraphClassLoader()

If one of the classloaders that was found was an existing instance of ClassGraphClassLoader, then delegate to that classloader first rather than trying to load from the ClassGraphClassLoader of the current scan, so that classes are compatible between nested scans (#485).

Returns:ClassGraphClassLoader

the ClassGraphClassLoader to delegate to before loading classes with this scan's own ClassGraphClassLoader (or null if none).

getModuleFinderback to summary
public ModuleFinder getModuleFinder()

Get the ModuleFinder.

Returns:ModuleFinder

The ModuleFinder.