| Modifier and Type | Class and Description |
|---|---|
| private static class | Scanner.
WorkUnitProcessor for scanning classfiles. |
| pack-priv static class | Scanner.
Used to enqueue classfiles for scanning. |
| pack-priv static class | Scanner.
Used to enqueue classpath elements for opening. |
| Modifier and Type | Field and Description |
|---|---|
| private final SingletonMap | classpathEntryObjToClasspathEntrySingletonMap
A singleton map used to eliminate creation of duplicate |
| private final ClasspathFinder | classpathFinder
The classpath finder. |
| private final ExecutorService | executorService
The executor service. |
| private final ClassGraph. | failureHandler
The failure handler. |
| private final InterruptionChecker | interruptionChecker
The interruption checker. |
| private final List | moduleOrder
The module order. |
| private final NestedJarHandler | nestedJarHandler
The nested jar handler. |
| private final int | numParallelTasks
The number of parallel tasks. |
| public boolean | performScan
If true, performing a scan. |
| private final ClassGraph. | scanResultProcessor
The scan result processor. |
| private final ScanSpec | scanSpec
The scan spec. |
| private final LogNode | topLevelLog
The toplevel log. |
| Access | Constructor and Description |
|---|---|
| pack-priv | Scanner(final boolean
If true, performing a scan. If false, only fetching the classpath. performScan, final ScanSpec the scan spec scanSpec, final ExecutorService the executor service executorService, final int the num parallel tasks numParallelTasks, final ClassGraph.the scan result processor scanResultProcessor,the failure handler failureHandler,the log topLevelLog)The classpath scanner. |
| Modifier and Type | Method and Description |
|---|---|
| public ScanResult | Returns: the scan resultImplements java. Determine the unique ordered classpath elements, and run a scan looking for file or classfile matches if necessary. |
| private List | Returns: the final classpath order, after depth-first traversal of child classpath elementsthe toplevel classpath elts, indexed by order within the toplevel classpath toplevelClasspathElts)Recursively perform a depth-first traversal of child classpath elements, breaking cycles if necessary, to determine the final classpath element order. |
| private static void | findClasspathOrderRec(final ClasspathElement
the current classpath element currClasspathElement, final Set<ClasspathElement> visited classpath elts visitedClasspathElts, final List<ClasspathElement> the classpath element order order)Recursively perform a depth-first search of jar interdependencies, breaking cycles if necessary, to determine the final classpath element order. |
| private void | findNestedClasspathElements(final List<AbstractMap.
the classpath elements classpathElts,the log log)Find classpath elements whose path is a prefix of another classpath element, and record the nesting. |
| private void | maskClassfiles(final List<ClasspathElement>
the classpath element order classpathElementOrder, final LogNode the mask log maskLog)Perform classpath masking of classfiles. |
| private WorkQueue. | Returns: the work unit processoron exit, the set of all classpath elements allClasspathEltsOut, final Set<ClasspathElement> on exit, the toplevel classpath elements toplevelClasspathEltsOut)Create a WorkUnitProcessor for opening traditional classpath entries (which are mapped to
|
| private static Object | Returns: The normalized classpath entry object.The classpath entry object. classpathEntryObj)Normalize a classpath entry object so that it is mapped to a canonical |
| private ScanResult | Returns: the scan resultOpen each of the classpath elements, looking for additional child classpath elements that need scanning (e.g.
|
| private ScanResult | Returns: the scan resultthe final classpath elt order finalClasspathEltOrder, final List<String> the final classpath elt order strs finalClasspathEltOrderStrs, final ClasspathFinder the classpathFinder)ClasspathFinderScan the classpath and/or visible modules. |
| private void | preprocessClasspathElementsByType(final List<ClasspathElement>
the final traditional classpath elt order finalTraditionalClasspathEltOrder, final LogNode the classpath finder log classpathFinderLog)Find classpath elements whose path is a prefix of another classpath element, and record the nesting. |
| private < the work unit type W> void | processWorkUnits(final Collection<W>
the work units workUnits, final LogNode the log entry text to group work units under log, final WorkQueue.the work unit processor workUnitProcessorProcess work units. |
| classpathEntryObjToClasspathEntrySingletonMap | back to summary |
|---|---|
| private final SingletonMap<Object, ClasspathElement, IOException> classpathEntryObjToClasspathEntrySingletonMap A singleton map used to eliminate creation of duplicate | |
| classpathFinder | back to summary |
|---|---|
| private final ClasspathFinder classpathFinder The classpath finder. | |
| executorService | back to summary |
|---|---|
| private final ExecutorService executorService The executor service. | |
| failureHandler | back to summary |
|---|---|
| private final ClassGraph. The failure handler. | |
| interruptionChecker | back to summary |
|---|---|
| private final InterruptionChecker interruptionChecker The interruption checker. | |
| moduleOrder | back to summary |
|---|---|
| private final List<ClasspathElementModule> moduleOrder The module order. | |
| nestedJarHandler | back to summary |
|---|---|
| private final NestedJarHandler nestedJarHandler The nested jar handler. | |
| numParallelTasks | back to summary |
|---|---|
| private final int numParallelTasks The number of parallel tasks. | |
| performScan | back to summary |
|---|---|
| public boolean performScan If true, performing a scan. If false, only fetching the classpath. | |
| scanResultProcessor | back to summary |
|---|---|
| private final ClassGraph. The scan result processor. | |
| scanSpec | back to summary |
|---|---|
| private final ScanSpec scanSpec The scan spec. | |
| topLevelLog | back to summary |
|---|---|
| private final LogNode topLevelLog The toplevel log. | |
| Scanner | back to summary |
|---|---|
| pack-priv Scanner(final boolean performScan, final ScanSpec scanSpec, final ExecutorService executorService, final int numParallelTasks, final ClassGraph. The classpath scanner. Scanning is started by calling
| |
| call | back to summary |
|---|---|
| public ScanResult call() throws InterruptedException, CancellationException, ExecutionException Implements java. Determine the unique ordered classpath elements, and run a scan looking for file or classfile matches if necessary.
| |
| findClasspathOrder | back to summary |
|---|---|
| private List Recursively perform a depth-first traversal of child classpath elements, breaking cycles if necessary, to determine the final classpath element order. This causes child classpath elements to be inserted in-place in the classpath order, after the parent classpath element that contained them.
| |
| findClasspathOrderRec | back to summary |
|---|---|
| private static void findClasspathOrderRec(final ClasspathElement currClasspathElement, final Set<ClasspathElement> visitedClasspathElts, final List<ClasspathElement> order) Recursively perform a depth-first search of jar interdependencies, breaking cycles if necessary, to determine the final classpath element order.
| |
| findNestedClasspathElements | back to summary |
|---|---|
| private void findNestedClasspathElements(final List<AbstractMap. Find classpath elements whose path is a prefix of another classpath element, and record the nesting.
| |
| maskClassfiles | back to summary |
|---|---|
| private void maskClassfiles(final List<ClasspathElement> classpathElementOrder, final LogNode maskLog) Perform classpath masking of classfiles. If the same relative classfile path occurs multiple times in the classpath, causes the second and subsequent occurrences to be ignored (removed).
| |
| newClasspathEntryWorkUnitProcessor | back to summary |
|---|---|
| private WorkQueue. Create a WorkUnitProcessor for opening traditional classpath entries (which are mapped to
| |
| normalizeClasspathEntry | back to summary |
|---|---|
| private static Object normalizeClasspathEntry(final Object classpathEntryObj) throws IOException Normalize a classpath entry object so that it is mapped to a canonical | |
| openClasspathElementsThenScan | back to summary |
|---|---|
| private ScanResult openClasspathElementsThenScan() throws InterruptedException, ExecutionException Open each of the classpath elements, looking for additional child classpath elements that need scanning (e.g.
| |
| performScan | back to summary |
|---|---|
| private ScanResult performScan(final List<ClasspathElement> finalClasspathEltOrder, final List<String> finalClasspathEltOrderStrs, final ClasspathFinder classpathFinder) throws InterruptedException, ExecutionException Scan the classpath and/or visible modules.
| |
| preprocessClasspathElementsByType | back to summary |
|---|---|
| private void preprocessClasspathElementsByType(final List<ClasspathElement> finalTraditionalClasspathEltOrder, final LogNode classpathFinderLog) Find classpath elements whose path is a prefix of another classpath element, and record the nesting.
| |
| processWorkUnits | back to summary |
|---|---|
| private <W> void processWorkUnits(final Collection<W> workUnits, final LogNode log, final WorkQueue. Process work units.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Set | acceptedClassNamesFound
The names of accepted classes found in the classpath while scanning paths within classpath elements. |
| private final Set | classNamesScheduledForExtendedScanning
The names of external (non-accepted) classes scheduled for extended scanning (where scanning is extended upwards to superclasses, interfaces and annotations). |
| private final List | classpathOrder
The classpath order. |
| private final Queue | scannedClassfiles
The valid |
| private final ScanSpec | scanSpec
The scan spec. |
| private final ConcurrentHashMap | stringInternMap
The string intern map. |
| Access | Constructor and Description |
|---|---|
| public | ClassfileScannerWorkUnitProcessor(final ScanSpec
the scan spec scanSpec, final List<ClasspathElement> the classpath order classpathOrder, final Set<String> the names of accepted classes found in the classpath while scanning paths within classpath
elements. acceptedClassNamesFound, final Queue<Classfile> the scannedClassfiles)Classfile objects created by scanning classfilesConstructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | processWorkUnit(final Scanner.
the work unit workUnit,the work queue workQueue,the log log)Implements nonapi. Process work unit. |
| acceptedClassNamesFound | back to summary |
|---|---|
| private final Set<String> acceptedClassNamesFound The names of accepted classes found in the classpath while scanning paths within classpath elements. | |
| classNamesScheduledForExtendedScanning | back to summary |
|---|---|
| private final Set<String> classNamesScheduledForExtendedScanning The names of external (non-accepted) classes scheduled for extended scanning (where scanning is extended upwards to superclasses, interfaces and annotations). | |
| classpathOrder | back to summary |
|---|---|
| private final List<ClasspathElement> classpathOrder The classpath order. | |
| scannedClassfiles | back to summary |
|---|---|
| private final Queue<Classfile> scannedClassfiles The valid | |
| scanSpec | back to summary |
|---|---|
| private final ScanSpec scanSpec The scan spec. | |
| stringInternMap | back to summary |
|---|---|
| private final ConcurrentHashMap<String, String> stringInternMap The string intern map. | |
| ClassfileScannerWorkUnitProcessor | back to summary |
|---|---|
| public ClassfileScannerWorkUnitProcessor(final ScanSpec scanSpec, final List<ClasspathElement> classpathOrder, final Set<String> acceptedClassNamesFound, final Queue<Classfile> scannedClassfiles) Constructor.
| |
| processWorkUnit | back to summary |
|---|---|
| public void processWorkUnit(final Scanner. Implements nonapi. Process work unit.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Resource | classfileResource
The classfile resource. |
| private final ClasspathElement | classpathElement
The classpath element. |
| private final boolean | isExternalClass
True if this is an external class. |
| Access | Constructor and Description |
|---|---|
| pack-priv | ClassfileScanWorkUnit(final ClasspathElement
the classpath element classpathElement, final Resource the classfile resource classfileResource, final boolean the is external class isExternalClass)Constructor. |
| classfileResource | back to summary |
|---|---|
| private final Resource classfileResource The classfile resource. | |
| classpathElement | back to summary |
|---|---|
| private final ClasspathElement classpathElement The classpath element. | |
| isExternalClass | back to summary |
|---|---|
| private final boolean isExternalClass True if this is an external class. | |
| ClassfileScanWorkUnit | back to summary |
|---|---|
| pack-priv ClassfileScanWorkUnit(final ClasspathElement classpathElement, final Resource classfileResource, final boolean isExternalClass) Constructor.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ClassLoader | classLoader
The classloader the classpath entry object was obtained from. |
| pack-priv final int | classpathElementIdxWithinParent
The order within the parent classpath element. |
| pack-priv Object | classpathEntryObj
The classpath entry object (a |
| pack-priv final String | packageRootPrefix
The package root prefix (e.g. "BOOT-INF/classes/"). |
| pack-priv final ClasspathElement | parentClasspathElement
The parent classpath element. |
| Access | Constructor and Description |
|---|---|
| public | ClasspathEntryWorkUnit(final Object
the raw classpath entry object classpathEntryObj, final ClassLoader the classloader the classpath entry object was obtained from classLoader, final ClasspathElement the parent classpath element parentClasspathElement, final int the order within parent classpath element classpathElementIdxWithinParent, final String the package root prefix packageRootPrefix)Constructor. |
| classLoader | back to summary |
|---|---|
| pack-priv final ClassLoader classLoader The classloader the classpath entry object was obtained from. | |
| classpathElementIdxWithinParent | back to summary |
|---|---|
| pack-priv final int classpathElementIdxWithinParent The order within the parent classpath element. | |
| classpathEntryObj | back to summary |
|---|---|
| pack-priv Object classpathEntryObj The classpath entry object (a | |
| packageRootPrefix | back to summary |
|---|---|
| pack-priv final String packageRootPrefix The package root prefix (e.g. "BOOT-INF/classes/"). | |
| parentClasspathElement | back to summary |
|---|---|
| pack-priv final ClasspathElement parentClasspathElement The parent classpath element. | |
| ClasspathEntryWorkUnit | back to summary |
|---|---|
| public ClasspathEntryWorkUnit(final Object classpathEntryObj, final ClassLoader classLoader, final ClasspathElement parentClasspathElement, final int classpathElementIdxWithinParent, final String packageRootPrefix) Constructor.
| |