Package org.testng.internal
Class PackageUtils
java.lang.Object
org.testng.internal.PackageUtils
Utility class that finds all the classes in a given package.
Created on Feb 24, 2006
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Collection<ClassLoader>The additional class loaders to find classes in.private static final Stringprivate static String[]private static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddClassLoader(ClassLoader loader) Add a class loader to the searchable loaders.private static booleanprivate static voidfindClassesInDirPackage(String packageName, List<String> included, List<String> excluded, String packagePath, boolean recursive, List<String> classes) static String[]private static String[]private static voidincludeOrExcludeClass(String packageName, String className, List<String> included, List<String> excluded, List<String> classes) private static booleanprivate static StringmakeFullClassName(String pkg, String cls) private static booleanmatchTestClasspath(URL url, String lastFragment, boolean recursive)
-
Field Details
-
UTF_8
- See Also:
-
PACKAGE_UTILS
-
testClassPaths
-
classLoaders
The additional class loaders to find classes in.
-
-
Constructor Details
-
PackageUtils
private PackageUtils()
-
-
Method Details
-
addClassLoader
Add a class loader to the searchable loaders. -
findClassesInPackage
public static String[] findClassesInPackage(String packageName, List<String> included, List<String> excluded) throws IOException - Parameters:
packageName- - The package nameincluded- - 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
-
matchTestClasspath
-
findClassesInDirPackage
-
makeFullClassName
-
includeOrExcludeClass
-
isIncluded
- Returns:
- true if name should be included.
-
find
-