@API(status=STABLE,
since="1.0")
public final class DiscoverySelectors
extends java.lang.Object
static factory methods for creating
DiscoverySelectors.| Modifier | Constructor and Description |
|---|---|
private |
DiscoverySelectors() |
| Modifier and Type | Method and Description |
|---|---|
static ClassSelector |
selectClass(java.lang.Class<?> clazz)
Create a
ClassSelector for the supplied Class. |
static ClassSelector |
selectClass(java.lang.ClassLoader classLoader,
java.lang.String className)
Create a
ClassSelector for the supplied class name and class loader. |
static ClassSelector |
selectClass(java.lang.String className)
Create a
ClassSelector for the supplied class name. |
static ClasspathResourceSelector |
selectClasspathResource(java.lang.String classpathResourceName)
Create a
ClasspathResourceSelector for the supplied classpath
resource name. |
static ClasspathResourceSelector |
selectClasspathResource(java.lang.String classpathResourceName,
FilePosition position)
Create a
ClasspathResourceSelector for the supplied classpath
resource name. |
static java.util.List<ClasspathRootSelector> |
selectClasspathRoots(java.util.Set<java.nio.file.Path> classpathRoots)
Create a list of
ClasspathRootSelectors for the supplied
classpath roots (directories or JAR files). |
static DirectorySelector |
selectDirectory(java.io.File directory)
Create a
DirectorySelector for the supplied directory. |
static DirectorySelector |
selectDirectory(java.lang.String path)
Create a
DirectorySelector for the supplied directory path. |
static FileSelector |
selectFile(java.io.File file)
Create a
FileSelector for the supplied file. |
static FileSelector |
selectFile(java.io.File file,
FilePosition position)
Create a
FileSelector for the supplied file. |
static FileSelector |
selectFile(java.lang.String path)
Create a
FileSelector for the supplied file path. |
static FileSelector |
selectFile(java.lang.String path,
FilePosition position)
Create a
FileSelector for the supplied file path. |
static IterationSelector |
selectIteration(DiscoverySelector parentSelector,
int... iterationIndices)
Create an
IterationSelector for the supplied parent selector and
iteration indices. |
static MethodSelector |
selectMethod(java.lang.Class<?> javaClass,
java.lang.reflect.Method method)
Create a
MethodSelector for the supplied Class and Method. |
static MethodSelector |
selectMethod(java.lang.Class<?> javaClass,
java.lang.String methodName)
Create a
MethodSelector for the supplied Class and method name. |
static MethodSelector |
selectMethod(java.lang.Class<?> javaClass,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
Create a
MethodSelector for the supplied Class, method name,
and parameter types. |
static MethodSelector |
selectMethod(java.lang.Class<?> javaClass,
java.lang.String methodName,
java.lang.String parameterTypeNames)
Create a
MethodSelector for the supplied Class, method name,
and parameter type names. |
static MethodSelector |
selectMethod(java.lang.ClassLoader classLoader,
java.lang.String fullyQualifiedMethodName)
Create a
MethodSelector for the supplied fully qualified
method name and class loader. |
static MethodSelector |
selectMethod(java.lang.ClassLoader classLoader,
java.lang.String className,
java.lang.String methodName)
Create a
MethodSelector for the supplied class name, method name,
and class loader. |
static MethodSelector |
selectMethod(java.lang.ClassLoader classLoader,
java.lang.String className,
java.lang.String methodName,
java.lang.String parameterTypeNames)
Create a
MethodSelector for the supplied class name, method name,
parameter type names, and class loader. |
static MethodSelector |
selectMethod(java.lang.String fullyQualifiedMethodName)
Create a
MethodSelector for the supplied fully qualified
method name. |
static MethodSelector |
selectMethod(java.lang.String className,
java.lang.String methodName)
Create a
MethodSelector for the supplied class name and method name
using the default class loader. |
static MethodSelector |
selectMethod(java.lang.String className,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
Create a
MethodSelector for the supplied class name, method name,
and parameter types. |
static MethodSelector |
selectMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String parameterTypeNames)
Create a
MethodSelector for the supplied class name, method name,
and parameter type names. |
static ModuleSelector |
selectModule(java.lang.String moduleName)
Create a
ModuleSelector for the supplied module name. |
static java.util.List<ModuleSelector> |
selectModules(java.util.Set<java.lang.String> moduleNames)
Create a list of
ModuleSelectors for the supplied module names. |
static NestedClassSelector |
selectNestedClass(java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName)
Create a
NestedClassSelector for the supplied class name, its enclosing
classes' names, and class loader. |
static NestedClassSelector |
selectNestedClass(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass)
Create a
NestedClassSelector for the supplied nested Class and its
enclosing classes. |
static NestedClassSelector |
selectNestedClass(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName)
Create a
NestedClassSelector for the supplied class name and its enclosing
classes' names. |
static NestedMethodSelector |
selectNestedMethod(java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName)
Create a
NestedMethodSelector for the supplied nested class name, method name,
and class loader. |
static NestedMethodSelector |
selectNestedMethod(java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName,
java.lang.String parameterTypeNames)
Create a
NestedMethodSelector for the supplied nested class name, method name,
parameter type names, and class loader. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.reflect.Method method)
Create a
NestedMethodSelector for the supplied nested Class and Method. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.String methodName)
Create a
NestedMethodSelector for the supplied nested Class and method name. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
Create a
NestedMethodSelector for the supplied enclosing classes,
nested class, method name, and parameter types. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.String methodName,
java.lang.String parameterTypeNames)
Create a
NestedMethodSelector for the supplied Class, method name,
and parameter type names. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName)
Create a
NestedMethodSelector for the supplied nested class name and method name. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
Create a
NestedMethodSelector for the supplied enclosing class names,
nested class name, method name, and parameter types. |
static NestedMethodSelector |
selectNestedMethod(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName,
java.lang.String parameterTypeNames)
Create a
NestedMethodSelector for the supplied nested class name, method name,
and parameter type names. |
static PackageSelector |
selectPackage(java.lang.String packageName)
Create a
PackageSelector for the supplied package name. |
static UniqueIdSelector |
selectUniqueId(java.lang.String uniqueId)
Create a
UniqueIdSelector for the supplied unique ID. |
static UniqueIdSelector |
selectUniqueId(UniqueId uniqueId)
Create a
UniqueIdSelector for the supplied UniqueId. |
static UriSelector |
selectUri(java.lang.String uri)
Create a
UriSelector for the supplied URI. |
static UriSelector |
selectUri(java.net.URI uri)
Create a
UriSelector for the supplied URI. |
public static UriSelector selectUri(java.lang.String uri)
UriSelector for the supplied URI.uri - the URI to select; never null or blankUriSelector,
selectUri(URI),
selectFile(String),
selectFile(File),
selectDirectory(String),
selectDirectory(File)public static UriSelector selectUri(java.net.URI uri)
UriSelector for the supplied URI.uri - the URI to select; never nullUriSelector,
selectUri(String),
selectFile(String),
selectFile(File),
selectDirectory(String),
selectDirectory(File)public static FileSelector selectFile(java.lang.String path)
FileSelector for the supplied file path.
This method selects the file using the supplied path as is, without verifying if the file exists.
path - the path to the file to select; never null or blankFileSelector,
selectFile(File),
selectFile(String, FilePosition),
selectFile(File, FilePosition),
selectDirectory(String),
selectDirectory(File)public static FileSelector selectFile(java.io.File file)
FileSelector for the supplied file.
This method selects the file in its canonical form and throws a PreconditionViolationException if the
file does not exist.
file - the file to select; never nullFileSelector,
selectFile(String),
selectFile(File, FilePosition),
selectFile(String, FilePosition),
selectDirectory(String),
selectDirectory(File)public static FileSelector selectFile(java.lang.String path, FilePosition position)
FileSelector for the supplied file path.
This method selects the file using the supplied path as is, without verifying if the file exists.
path - the path to the file to select; never null or blankposition - the position inside the file; may be nullFileSelector,
selectFile(String),
selectFile(File),
selectFile(File, FilePosition),
selectDirectory(String),
selectDirectory(File)public static FileSelector selectFile(java.io.File file, FilePosition position)
FileSelector for the supplied file.
This method selects the file in its canonical form and throws a PreconditionViolationException if the
file does not exist.
file - the file to select; never nullposition - the position inside the file; may be nullFileSelector,
selectFile(File),
selectFile(String),
selectFile(String, FilePosition),
selectDirectory(String),
selectDirectory(File)public static DirectorySelector selectDirectory(java.lang.String path)
DirectorySelector for the supplied directory path.
This method selects the directory using the supplied path as is, without verifying if the directory exists.
path - the path to the directory to select; never null or blankDirectorySelector,
selectDirectory(File),
selectFile(String),
selectFile(File)public static DirectorySelector selectDirectory(java.io.File directory)
DirectorySelector for the supplied directory.
This method selects the directory in its canonical form and throws a PreconditionViolationException if the
directory does not exist.
directory - the directory to select; never nullDirectorySelector,
selectDirectory(String),
selectFile(String),
selectFile(File)public static java.util.List<ClasspathRootSelector> selectClasspathRoots(java.util.Set<java.nio.file.Path> classpathRoots)
ClasspathRootSelectors for the supplied
classpath roots (directories or JAR files).
Since the supplied paths are converted to URIs, the
FileSystem that created them must be the
default or one that
has been created by an installed
FileSystemProvider.
Since engines are not expected to modify the classpath, the classpath roots represented by the resulting selectors must be on the classpath of the context class loader of the thread that uses these selectors.
classpathRoots - set of directories and JAR files in the filesystem
that represent classpath roots; never nullClasspathRootSelector,
Thread.getContextClassLoader()public static ClasspathResourceSelector selectClasspathResource(java.lang.String classpathResourceName)
ClasspathResourceSelector for the supplied classpath
resource name.
The name of a classpath resource must follow the semantics
for resource paths as defined in ClassLoader.getResource(String).
If the supplied classpath resource name is prefixed with a slash
(/), the slash will be removed.
Since engines are not expected to modify the classpath, the supplied classpath resource must be on the classpath of the context class loader of the thread that uses the resulting selector.
classpathResourceName - the name of the classpath resource; never
null or blankselectClasspathResource(String, FilePosition),
ClasspathResourceSelector,
ClassLoader.getResource(String),
ClassLoader.getResourceAsStream(String),
ClassLoader.getResources(String)public static ClasspathResourceSelector selectClasspathResource(java.lang.String classpathResourceName, FilePosition position)
ClasspathResourceSelector for the supplied classpath
resource name.
The name of a classpath resource must follow the semantics
for resource paths as defined in ClassLoader.getResource(String).
If the supplied classpath resource name is prefixed with a slash
(/), the slash will be removed.
Since engines are not expected to modify the classpath, the supplied classpath resource must be on the classpath of the context class loader of the thread that uses the resulting selector.
classpathResourceName - the name of the classpath resource; never
null or blankposition - the position inside the classpath resource; may be nullselectClasspathResource(String),
ClasspathResourceSelector,
ClassLoader.getResource(String),
ClassLoader.getResourceAsStream(String),
ClassLoader.getResources(String)@API(status=STABLE,
since="1.10")
public static ModuleSelector selectModule(java.lang.String moduleName)
ModuleSelector for the supplied module name.
The unnamed module is not supported.
moduleName - the module name to select; never null or blankModuleSelector@API(status=STABLE,
since="1.10")
public static java.util.List<ModuleSelector> selectModules(java.util.Set<java.lang.String> moduleNames)
ModuleSelectors for the supplied module names.
The unnamed module is not supported.
moduleNames - the module names to select; never null, never
containing null or blankModuleSelectorpublic static PackageSelector selectPackage(java.lang.String packageName)
PackageSelector for the supplied package name.
The default package is represented by an empty string ("").
packageName - the package name to select; never null and
never containing whitespace onlyPackageSelectorpublic static ClassSelector selectClass(java.lang.Class<?> clazz)
ClassSelector for the supplied Class.clazz - the class to select; never nullClassSelectorpublic static ClassSelector selectClass(java.lang.String className)
ClassSelector for the supplied class name.className - the fully qualified name of the class to select; never
null or blankClassSelector@API(status=EXPERIMENTAL,
since="1.10")
public static ClassSelector selectClass(java.lang.ClassLoader classLoader,
java.lang.String className)
ClassSelector for the supplied class name and class loader.classLoader - the class loader to use to load the class, or null
to signal that the default ClassLoader should be usedclassName - the fully qualified name of the class to select; never
null or blankClassSelectorpublic static MethodSelector selectMethod(java.lang.String fullyQualifiedMethodName) throws PreconditionViolationException
MethodSelector for the supplied fully qualified
method name.
The following formats are supported.
[fully qualified class name]#[methodName][fully qualified class name]#[methodName](parameter type list)
The parameter type list is a comma-separated list of primitive names or fully qualified class names for the types of parameters accepted by the method.
Array parameter types may be specified using either the JVM's internal
String representation (e.g., [[I for int[][],
[Ljava.lang.String; for java.lang.String[], etc.) or
source code syntax (e.g., int[][], java.lang.String[],
etc.).
| Method | Fully Qualified Method Name |
|---|---|
java.lang.String.chars() | java.lang.String#chars |
java.lang.String.chars() | java.lang.String#chars() |
java.lang.String.equalsIgnoreCase(String) | java.lang.String#equalsIgnoreCase(java.lang.String) |
java.lang.String.substring(int, int) | java.lang.String#substring(int, int) |
example.Calc.avg(int[]) | example.Calc#avg([I) |
example.Calc.avg(int[]) | example.Calc#avg(int[]) |
example.Matrix.multiply(double[][]) | example.Matrix#multiply([[D) |
example.Matrix.multiply(double[][]) | example.Matrix#multiply(double[][]) |
example.Service.process(String[]) | example.Service#process([Ljava.lang.String;) |
example.Service.process(String[]) | example.Service#process(java.lang.String[]) |
example.Service.process(String[][]) | example.Service#process([[Ljava.lang.String;) |
example.Service.process(String[][]) | example.Service#process(java.lang.String[][]) |
fullyQualifiedMethodName - the fully qualified name of the method to
select; never null or blankPreconditionViolationExceptionMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static MethodSelector selectMethod(java.lang.ClassLoader classLoader,
java.lang.String fullyQualifiedMethodName)
throws PreconditionViolationException
MethodSelector for the supplied fully qualified
method name and class loader.
See selectMethod(String) for the supported formats for a
fully qualified method name.
classLoader - the class loader to use to load the method's declaring
class, or null to signal that the default ClassLoader
should be usedfullyQualifiedMethodName - the fully qualified name of the method to
select; never null or blankPreconditionViolationExceptionselectMethod(String),
MethodSelectorpublic static MethodSelector selectMethod(java.lang.String className, java.lang.String methodName)
MethodSelector for the supplied class name and method name
using the default class loader.className - the fully qualified name of the class in which the method
is declared, or a subclass thereof; never null or blankmethodName - the name of the method to select; never null or blankMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static MethodSelector selectMethod(java.lang.ClassLoader classLoader,
java.lang.String className,
java.lang.String methodName)
MethodSelector for the supplied class name, method name,
and class loader.classLoader - the class loader to use to load the class, or null
to signal that the default ClassLoader should be usedclassName - the fully qualified name of the class in which the method
is declared, or a subclass thereof; never null or blankmethodName - the name of the method to select; never null or blankMethodSelectorpublic static MethodSelector selectMethod(java.lang.String className, java.lang.String methodName, java.lang.String parameterTypeNames)
MethodSelector for the supplied class name, method name,
and parameter type names.
The parameter type names String is typically a comma-separated
list of atomic types, fully qualified class names, or array types; however,
the exact syntax depends on the underlying test engine.
className - the fully qualified name of the class in which the method
is declared, or a subclass thereof; never null or blankmethodName - the name of the method to select; never null or blankparameterTypeNames - the parameter type names as a single string; never
null though potentially an empty string if the method does not declare
parametersMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static MethodSelector selectMethod(java.lang.ClassLoader classLoader,
java.lang.String className,
java.lang.String methodName,
java.lang.String parameterTypeNames)
MethodSelector for the supplied class name, method name,
parameter type names, and class loader.
The parameter type names String is typically a comma-separated
list of atomic types, fully qualified class names, or array types; however,
the exact syntax depends on the underlying test engine.
classLoader - the class loader to use to load the class, or null
to signal that the default ClassLoader should be usedclassName - the fully qualified name of the class in which the method
is declared, or a subclass thereof; never null or blankmethodName - the name of the method to select; never null or blankparameterTypeNames - the parameter type names as a single string; never
null though potentially an empty string if the method does not declare
any parametersMethodSelectorpublic static MethodSelector selectMethod(java.lang.Class<?> javaClass, java.lang.String methodName)
MethodSelector for the supplied Class and method name.javaClass - the class in which the method is declared, or a subclass thereof;
never nullmethodName - the name of the method to select; never null or blankMethodSelectorpublic static MethodSelector selectMethod(java.lang.Class<?> javaClass, java.lang.String methodName, java.lang.String parameterTypeNames)
MethodSelector for the supplied Class, method name,
and parameter type names.
The parameter type names String is typically a comma-separated
list of atomic types, fully qualified class names, or array types; however,
the exact syntax depends on the underlying test engine.
javaClass - the class in which the method is declared, or a subclass thereof;
never nullmethodName - the name of the method to select; never null or blankparameterTypeNames - the parameter type names as a single string; never
null though potentially an empty string if the method does not declare
any parametersMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static MethodSelector selectMethod(java.lang.String className,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
MethodSelector for the supplied class name, method name,
and parameter types.className - the fully qualified name of the class in which the method
is declared, or a subclass thereof; never null or blankmethodName - the name of the method to select; never null or blankparameterTypes - the formal parameter types of the method; never
null though potentially empty if the method does not declare parametersMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static MethodSelector selectMethod(java.lang.Class<?> javaClass,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
MethodSelector for the supplied Class, method name,
and parameter types.javaClass - the class in which the method is declared, or a subclass thereof;
never nullmethodName - the name of the method to select; never null or blankparameterTypes - the formal parameter types of the method; never
null though potentially empty if the method does not declare parametersMethodSelectorpublic static MethodSelector selectMethod(java.lang.Class<?> javaClass, java.lang.reflect.Method method)
MethodSelector for the supplied Class and Method.javaClass - the class in which the method is declared, or a subclass thereof;
never nullmethod - the method to select; never nullMethodSelector@API(status=STABLE,
since="1.6")
public static NestedClassSelector selectNestedClass(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass)
NestedClassSelector for the supplied nested Class and its
enclosing classes.enclosingClasses - the path to the nested class to select; never null or emptynestedClass - the nested class to select; never nullNestedClassSelector@API(status=STABLE,
since="1.6")
public static NestedClassSelector selectNestedClass(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName)
NestedClassSelector for the supplied class name and its enclosing
classes' names.enclosingClassNames - the names of the enclosing classes; never null or emptynestedClassName - the name of the nested class to select; never null or blankNestedClassSelector@API(status=EXPERIMENTAL,
since="1.10")
public static NestedClassSelector selectNestedClass(java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName)
NestedClassSelector for the supplied class name, its enclosing
classes' names, and class loader.classLoader - the class loader to use to load the enclosing and nested classes, or
null to signal that the default ClassLoader should be usedenclosingClassNames - the names of the enclosing classes; never null or emptynestedClassName - the name of the nested class to select; never null or blankNestedClassSelector@API(status=STABLE,
since="1.6")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName)
NestedMethodSelector for the supplied nested class name and method name.enclosingClassNames - the names of the enclosing classes; never null or emptynestedClassName - the name of the nested class to select; never null or blankmethodName - the name of the method to select; never null or blankNestedMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static NestedMethodSelector selectNestedMethod(java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName)
throws PreconditionViolationException
NestedMethodSelector for the supplied nested class name, method name,
and class loader.classLoader - the class loader to use to load the method's declaring
class, or null to signal that the default ClassLoader
should be usedenclosingClassNames - the names of the enclosing classes; never null or emptynestedClassName - the name of the nested class to select; never null or blankmethodName - the name of the method to select; never null or blankPreconditionViolationExceptionNestedMethodSelector@API(status=STABLE,
since="1.6")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName,
java.lang.String parameterTypeNames)
NestedMethodSelector for the supplied nested class name, method name,
and parameter type names.
The parameter type names String is typically a comma-separated
list of atomic types, fully qualified class names, or array types; however,
the exact syntax depends on the underlying test engine.
enclosingClassNames - the names of the enclosing classes; never null or emptynestedClassName - the name of the nested class to select; never null or blankmethodName - the name of the method to select; never null or blankparameterTypeNames - the parameter type names as a single string; never
null though potentially an empty string if the method does not declare
parametersNestedMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static NestedMethodSelector selectNestedMethod(java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName,
java.lang.String parameterTypeNames)
NestedMethodSelector for the supplied nested class name, method name,
parameter type names, and class loader.classLoader - the class loader to use to load the method's declaring
class, or null to signal that the default ClassLoader
should be usedenclosingClassNames - the names of the enclosing classes; never null or emptynestedClassName - the name of the nested class to select; never null or blankmethodName - the name of the method to select; never null or blankparameterTypeNames - the parameter type names as a single string; never
null though potentially an empty string if the method does not declare
parametersselectNestedMethod(List, String, String, String)@API(status=EXPERIMENTAL,
since="1.10")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.String> enclosingClassNames,
java.lang.String nestedClassName,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
NestedMethodSelector for the supplied enclosing class names,
nested class name, method name, and parameter types.enclosingClassNames - the names of the enclosing classes; never null
or emptynestedClassName - the name of the nested class to select; never null
or blankmethodName - the name of the method to select; never null or blankparameterTypes - the formal parameter types of the method; never null
though potentially empty if the method does not declare parametersNestedMethodSelector@API(status=STABLE,
since="1.6")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.String methodName)
NestedMethodSelector for the supplied nested Class and method name.enclosingClasses - the path to the nested class to select; never null or emptynestedClass - the nested class to select; never nullmethodName - the name of the method to select; never null or blankNestedMethodSelector@API(status=STABLE,
since="1.6")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.String methodName,
java.lang.String parameterTypeNames)
NestedMethodSelector for the supplied Class, method name,
and parameter type names.
The parameter type names String is typically a comma-separated
list of atomic types, fully qualified class names, or array types; however,
the exact syntax depends on the underlying test engine.
enclosingClasses - the path to the nested class to select; never null or emptynestedClass - the nested class to select; never nullmethodName - the name of the method to select; never null or blankparameterTypeNames - the parameter type names as a single string; never
null though potentially an empty string if the method does not declare
parametersNestedMethodSelector@API(status=EXPERIMENTAL,
since="1.10")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.String methodName,
java.lang.Class<?>... parameterTypes)
NestedMethodSelector for the supplied enclosing classes,
nested class, method name, and parameter types.enclosingClasses - the path to the nested class to select; never null
or emptynestedClass - the nested class to select; never nullmethodName - the name of the method to select; never null or blankparameterTypes - the formal parameter types of the method; never null
though potentially empty if the method does not declare parametersNestedMethodSelector@API(status=STABLE,
since="1.6")
public static NestedMethodSelector selectNestedMethod(java.util.List<java.lang.Class<?>> enclosingClasses,
java.lang.Class<?> nestedClass,
java.lang.reflect.Method method)
NestedMethodSelector for the supplied nested Class and Method.enclosingClasses - the path to the nested class to select; never null or emptynestedClass - the nested class to select; never nullmethod - the method to select; never nullNestedMethodSelectorpublic static UniqueIdSelector selectUniqueId(UniqueId uniqueId)
UniqueIdSelector for the supplied UniqueId.uniqueId - the UniqueId to select; never nullUniqueIdSelectorpublic static UniqueIdSelector selectUniqueId(java.lang.String uniqueId)
UniqueIdSelector for the supplied unique ID.uniqueId - the unique ID to select; never null or blankUniqueIdSelector@API(status=EXPERIMENTAL,
since="1.9")
public static IterationSelector selectIteration(DiscoverySelector parentSelector,
int... iterationIndices)
IterationSelector for the supplied parent selector and
iteration indices.parentSelector - the parent selector to select iterations for; never
nulliterationIndices - the iteration indices to select; never
null or emptyIterationSelector