These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!
| Modifier and Type | Field and Description |
|---|---|
| private final Supplier | |
| private static final char | |
| private static final String | |
| private final BiFunction | |
| private static final Logger | |
| private static final String | MALFORMED_CLASS_NAME_ERROR_MESSAGE
Malformed class name InternalError like reported in #401. |
| private static final char | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | DefaultClasspathScanner(Supplier<ClassLoader> classLoaderSupplier, BiFunction<String, ClassLoader, Try<Class<?>>> loadClass)
|
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private String | Returns: the resource name; nevernullThe fully qualified resource name is a |
| private String | |
| private String | |
| private String | |
| private List | |
| private List | findClassesForUris(List<URI> baseUris, String basePackageName, ClassFilter classFilter)
Recursively scan for classes in all the supplied source directories. |
| private List | |
| private List | findResourcesForUris(List<URI> baseUris, String basePackageName, ResourceFilter resourceFilter)
Recursively scan for resources in all the supplied source directories. |
| private ClassLoader | |
| private List | |
| private List | |
| private void | |
| private void | |
| private void | |
| private void | |
| private static String | |
| private void | processClassFileSafely(Path baseDir, String basePackageName, ClassFilter classFilter, Path classFile, Consumer<Class<?>> classConsumer)
|
| private void | processResourceFileSafely(Path baseDir, String basePackageName, ResourceFilter resourceFilter, Path resourceFile, Consumer<Resource> resourceConsumer)
|
| private static URI | |
| public List | scanForClassesInClasspathRoot(URI root, ClassFilter classFilter)
Implements org. Find all classes in the supplied classpath |
| public List | scanForClassesInPackage(String basePackageName, ClassFilter classFilter)
Implements org. Find all classes in the supplied classpath |
| public List | scanForResourcesInClasspathRoot(URI root, ResourceFilter resourceFilter)
Overrides default org. Find all resources in the supplied classpath |
| public List | scanForResourcesInPackage(String basePackageName, ResourceFilter resourceFilter)
Overrides default org. Find all resources in the supplied classpath |
| private static void |
| classLoaderSupplier | back to summary |
|---|---|
| private final Supplier<ClassLoader> classLoaderSupplier | |
| CLASSPATH_RESOURCE_PATH_SEPARATOR | back to summary |
|---|---|
| private static final char CLASSPATH_RESOURCE_PATH_SEPARATOR | |
| CLASSPATH_RESOURCE_PATH_SEPARATOR_STRING | back to summary |
|---|---|
| private static final String CLASSPATH_RESOURCE_PATH_SEPARATOR_STRING | |
| loadClass | back to summary |
|---|---|
| private final BiFunction<String, ClassLoader, Try<Class<?>>> loadClass | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| MALFORMED_CLASS_NAME_ERROR_MESSAGE | back to summary |
|---|---|
| private static final String MALFORMED_CLASS_NAME_ERROR_MESSAGE Malformed class name InternalError like reported in #401. | |
| PACKAGE_SEPARATOR_CHAR | back to summary |
|---|---|
| private static final char PACKAGE_SEPARATOR_CHAR | |
| PACKAGE_SEPARATOR_STRING | back to summary |
|---|---|
| private static final String PACKAGE_SEPARATOR_STRING | |
| DefaultClasspathScanner | back to summary |
|---|---|
| pack-priv DefaultClasspathScanner(Supplier<ClassLoader> classLoaderSupplier, BiFunction<String, ClassLoader, Try<Class<?>>> loadClass) | |
| determineFullyQualifiedClassName | back to summary |
|---|---|
| private String determineFullyQualifiedClassName(Path baseDir, String basePackageName, Path classFile) | |
| determineFullyQualifiedResourceName | back to summary |
|---|---|
| private String determineFullyQualifiedResourceName(Path baseDir, String basePackageName, Path resourceFile) The fully qualified resource name is a The path is relative to the classpath root in which the resource is located.
| |
| determineSimpleClassName | back to summary |
|---|---|
| private String determineSimpleClassName(Path classFile) | |
| determineSimpleResourceName | back to summary |
|---|---|
| private String determineSimpleResourceName(Path resourceFile) | |
| determineSubpackageName | back to summary |
|---|---|
| private String determineSubpackageName(Path baseDir, Path classFile) | |
| findClassesForUri | back to summary |
|---|---|
| private List | |
| findClassesForUris | back to summary |
|---|---|
| private List Recursively scan for classes in all the supplied source directories. | |
| findResourcesForUri | back to summary |
|---|---|
| private List | |
| findResourcesForUris | back to summary |
|---|---|
| private List Recursively scan for resources in all the supplied source directories. | |
| getClassLoader | back to summary |
|---|---|
| private ClassLoader getClassLoader() | |
| getRootUrisForPackage | back to summary |
|---|---|
| private List | |
| getRootUrisForPackageNameOnClassPathAndModulePath | back to summary |
|---|---|
| private List | |
| handleInternalError | back to summary |
|---|---|
| private void handleInternalError(Path classFile, String fullyQualifiedClassName, InternalError ex) | |
| handleThrowable | back to summary |
|---|---|
| private void handleThrowable(Path classFile, Throwable throwable) | |
| logGenericFileProcessingException | back to summary |
|---|---|
| private void logGenericFileProcessingException(Path classpathFile, Throwable throwable) | |
| logMalformedClassName | back to summary |
|---|---|
| private void logMalformedClassName(Path classFile, String fullyQualifiedClassName, InternalError ex) | |
| packagePath | back to summary |
|---|---|
| private static String packagePath(String packageName) | |
| processClassFileSafely | back to summary |
|---|---|
| private void processClassFileSafely(Path baseDir, String basePackageName, ClassFilter classFilter, Path classFile, Consumer<Class<?>> classConsumer) | |
| processResourceFileSafely | back to summary |
|---|---|
| private void processResourceFileSafely(Path baseDir, String basePackageName, ResourceFilter resourceFilter, Path resourceFile, Consumer<Resource> resourceConsumer) | |
| removeTrailingClasspathResourcePathSeparator | back to summary |
|---|---|
| private static URI removeTrailingClasspathResourcePathSeparator(URI uri) | |
| scanForClassesInClasspathRoot | back to summary |
|---|---|
| public List Implements org. Doc from org. Find all classes in the supplied classpath The classpath scanning algorithm searches recursively in subpackages beginning with the root of the classpath.
| |
| scanForClassesInPackage | back to summary |
|---|---|
| public List Implements org. Doc from org. Find all classes in the supplied classpath The classpath scanning algorithm searches recursively in subpackages beginning with the root of the classpath.
| |
| scanForResourcesInClasspathRoot | back to summary |
|---|---|
| public List Overrides default org. Doc from org. Find all resources in the supplied classpath The classpath scanning algorithm searches recursively in subpackages beginning with the root of the classpath.
| |
| scanForResourcesInPackage | back to summary |
|---|---|
| public List Overrides default org. Doc from org. Find all resources in the supplied classpath The classpath scanning algorithm searches recursively in subpackages beginning with the root of the classpath.
| |
| walkFilesForUri | back to summary |
|---|---|
| private static void walkFilesForUri(URI baseUri, Predicate<Path> filter, BiConsumer<Path, Path> consumer) | |