Module nl.jqno.equalsverifier
Class PackageScanner
java.lang.Object
nl.jqno.equalsverifier.internal.reflection.PackageScanner
Scans a package for classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Class<?> fileToClass(File f, String packagePath) getClassesIn(String packageName, PackageScanOptions options) Scans the given package for classes.getResources(String packagePath) processDirectory(URL resource, boolean scanRecursively) processResource(URL resource, String packagePath, PackageScanOptions options) walkDirectory(File dir, boolean scanRecursively)
-
Constructor Details
-
PackageScanner
private PackageScanner()Do not instantiate.
-
-
Method Details
-
getClassesIn
Scans the given package for classes. Note that ifmustExtendis given, and it exists withinpackageName, it will NOT be included.- Parameters:
packageName- The package to scan.options- Modifications to the standard package scanning behaviour.- Returns:
- the classes contained in the given package.
-
getResources
-
processResource
private static Stream<File> processResource(URL resource, String packagePath, PackageScanOptions options) -
processDirectory
private static Stream<File> processDirectory(URL resource, boolean scanRecursively) throws URISyntaxException - Throws:
URISyntaxException
-
walkDirectory
-
walkJar
private static Stream<File> walkJar(URL resource, String packagePath, boolean scanRecursively) throws IOException - Throws:
IOException
-
fileToClass
-