@API(status=STABLE,
since="1.0")
public class ClasspathResourceSelector
extends java.lang.Object
implements DiscoverySelector
DiscoverySelector that selects the name of a classpath resource
so that TestEngines can load resources
from the classpath — for example, to load XML or JSON files from the classpath,
potentially within JARs.
Since engines are not expected to modify the classpath, the classpath resource represented by this selector must be on the classpath of the context class loader of the thread that uses it.
DiscoverySelectors.selectClasspathResource(String),
ClasspathRootSelector,
getClasspathResourceName()| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
classpathResourceName |
| Constructor and Description |
|---|
ClasspathResourceSelector(java.lang.String classpathResourceName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getClasspathResourceName()
Get the name of the selected classpath resource.
|
int |
hashCode() |
java.lang.String |
toString() |
ClasspathResourceSelector(java.lang.String classpathResourceName)
public java.lang.String getClasspathResourceName()
The name of a classpath resource must follow the semantics
for resource paths as defined in ClassLoader.getResource(String).
ClassLoader.getResource(String),
ClassLoader.getResourceAsStream(String),
ClassLoader.getResources(String)@API(status=STABLE,
since="1.3")
public boolean equals(java.lang.Object o)
equals in class java.lang.Object@API(status=STABLE,
since="1.3")
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object