Class ClasspathFinder


  • public class ClasspathFinder
    extends java.lang.Object
    A class to find the unique ordered classpath elements.
    • Field Detail

      • classpathOrder

        private final ClasspathOrder classpathOrder
        The classpath order.
      • classLoaderOrderRespectingParentDelegation

        private java.lang.ClassLoader[] classLoaderOrderRespectingParentDelegation
        The default order in which ClassLoaders are called to load classes, respecting parent-first/parent-last delegation order.
      • delegateClassGraphClassLoader

        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).
    • Constructor Detail

      • ClasspathFinder

        public ClasspathFinder​(ScanSpec scanSpec,
                               ReflectionUtils reflectionUtils,
                               LogNode log)
        A class to find the unique ordered classpath elements.
        Parameters:
        scanSpec - The ScanSpec.
        log - The log.
    • Method Detail

      • getClasspathOrder

        public ClasspathOrder getClasspathOrder()
        Get the classpath order.
        Returns:
        The order of raw classpath elements obtained from ClassLoaders.
      • getClassLoaderOrderRespectingParentDelegation

        public java.lang.ClassLoader[] getClassLoaderOrderRespectingParentDelegation()
        Get the ClassLoader order, respecting parent-first/parent-last delegation order.
        Returns:
        the class loader order.