Module org.junit.platform.engine
Class ClasspathRootSelector
java.lang.Object
org.junit.platform.engine.discovery.ClasspathRootSelector
- All Implemented Interfaces:
DiscoverySelector
@API(status=STABLE,
since="1.0")
public class ClasspathRootSelector
extends Object
implements DiscoverySelector
A
DiscoverySelector
that selects a classpath root so that
TestEngines
can search for class
files or resources within the physical classpath — for example, to
scan for test classes.
Since engines are not expected to modify the classpath, the classpath root represented by this selector must be on the classpath of the context class loader of the thread that uses this selector.
- Since:
- 1.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the selected classpath root directory as anURI
.int
hashCode()
Return the identifier of this selector.toString()
-
Method Details
-
getClasspathRoot
Get the selected classpath root directory as anURI
. -
equals
-
hashCode
-
toString
-
toIdentifier
Description copied from interface:DiscoverySelector
Return the identifier of this selector.The returned identifier must be parsable by a corresponding
DiscoverySelectorIdentifierParser
.The default implementation returns
Optional.empty()
. Can be overridden by concrete implementations.- Specified by:
toIdentifier
in interfaceDiscoverySelector
- Returns:
- an
Optional
containing the identifier of this selector; nevernull
but potentially empty if the selector does not support identifiers
-