DiscoverySelector@API(status=STABLE, since="1.0") public class ClassSelector extends java.lang.Object implements DiscoverySelector
DiscoverySelector that selects a Class or class name so
that TestEngines can discover
tests or containers based on classes.
If a Java Class reference is provided, the selector will return
that Class and its class name accordingly. If a class name is
provided, the selector will only attempt to lazily load the Class
if getJavaClass() is invoked.
In this context, Java Class means anything that can be referenced
as a Class on the JVM — for example, classes from other JVM
languages such Groovy, Scala, etc.
ClassSource| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getClassName() |
Get the selected class name.
|
java.lang.Class<?> |
getJavaClass() |
Get the selected
Class. |
java.lang.String |
toString() |
public java.lang.String getClassName()
public java.lang.Class<?> getJavaClass()
Class.
If the Class was not provided, but only the name, this method
attempts to lazily load the Class based on its name and throws a
PreconditionViolationException if the class cannot be loaded.
public java.lang.String toString()
toString in class java.lang.Object