Class PackageUtils

java.lang.Object
org.testng.internal.PackageUtils

public class PackageUtils extends Object
Utility class that finds all the classes in a given package.

Created on Feb 24, 2006

  • Field Details

    • testClassPaths

      private static String[] testClassPaths
    • classLoaders

      private static final Collection<ClassLoader> classLoaders
      The additional class loaders to find classes in.
  • Constructor Details

    • PackageUtils

      private PackageUtils()
  • Method Details

    • findClassesInPackage

      public static String[] findClassesInPackage(String packageName, List<String> included, List<String> excluded) throws IOException
      Parameters:
      packageName - - The package name
      included - - The inclusion list.
      excluded - - The exclusion list
      Returns:
      - The list of all the classes inside this package
      Throws:
      IOException - - if there is an exception.
    • getTestClasspath

      private static String[] getTestClasspath()
    • asURLs

      private static Function<ClassLoader,Stream<URL>> asURLs(String packageDir)
    • matchTestClasspath

      private static boolean matchTestClasspath(URL url, String lastFragment, boolean recursive)