Class ClassScanner
java.lang.Object
ClassScanner
A utility class for scanning and loading classes from Java modules.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassScannerProvides access to the singleton instance of ClassScanner.Performs the actual class scanning by iterating through modules in the boot layer.Static method to get the list of all classes found in the modules.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ClassScanner
private ClassScanner()
-
-
Method Details
-
getInstance
Provides access to the singleton instance of ClassScanner.- Returns:
- the singleton instance of ClassScanner
-
totalClasses
Static method to get the list of all classes found in the modules. Uses the singleton instance to perform the scan.- Returns:
- List of classes found across Java modules
-
performClassScan
Performs the actual class scanning by iterating through modules in the boot layer. Only classes within "java." and "jdk." packages are scanned, and only exported packages are included.- Returns:
- List of Class<?> objects representing the scanned classes
-