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 String
private static String[]
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addClassLoader
(ClassLoader loader) Add a class loader to the searchable loaders.private static boolean
private static void
findClassesInDirPackage
(String packageName, List<String> included, List<String> excluded, String packagePath, boolean recursive, List<String> classes) static String[]
private static String[]
private static void
includeOrExcludeClass
(String packageName, String className, List<String> included, List<String> excluded, List<String> classes) private static boolean
private static String
makeFullClassName
(String pkg, String cls) private static boolean
matchTestClasspath
(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
-