java.lang.Object
nl.jqno.equalsverifier.internal.reflection.PackageScanner

public final class PackageScanner extends Object
Scans a package for classes.
  • Constructor Details

    • PackageScanner

      private PackageScanner()
      Do not instantiate.
  • Method Details

    • getClassesIn

      public static List<Class<?>> getClassesIn(String packageName, PackageScanOptions options)
      Scans the given package for classes. Note that if mustExtend is given, and it exists within packageName, 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

      private static Stream<URL> getResources(String packagePath)
    • 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

      private static Stream<File> walkDirectory(File dir, boolean scanRecursively)
    • walkJar

      private static Stream<File> walkJar(URL resource, String packagePath, boolean scanRecursively) throws IOException
      Throws:
      IOException
    • fileToClass

      private static Class<?> fileToClass(File f, String packagePath)