Class DiscoverySelectors
static factory methods for creating
DiscoverySelectors.- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<? extends DiscoverySelector> Parse the supplied string representation of aDiscoverySelectorIdentifier.static Optional<? extends DiscoverySelector> parse(DiscoverySelectorIdentifier identifier) Parse the suppliedDiscoverySelectorIdentifier.static Stream<? extends DiscoverySelector> Parse the supplied string representations ofDiscoverySelectorIdentifiers.static Stream<? extends DiscoverySelector> parseAll(Collection<DiscoverySelectorIdentifier> identifiers) Parse the suppliedDiscoverySelectorIdentifiers.static ClassSelectorselectClass(Class<?> clazz) Create aClassSelectorfor the suppliedClass.static ClassSelectorselectClass(ClassLoader classLoader, String className) Create aClassSelectorfor the supplied class name and class loader.static ClassSelectorselectClass(String className) Create aClassSelectorfor the supplied class name.static ClasspathResourceSelectorselectClasspathResource(String classpathResourceName) Create aClasspathResourceSelectorfor the supplied classpath resource name.static ClasspathResourceSelectorselectClasspathResource(String classpathResourceName, FilePosition position) Create aClasspathResourceSelectorfor the supplied classpath resource name.static ClasspathResourceSelectorselectClasspathResource(Set<Resource> classpathResources) Create aClasspathResourceSelectorfor the supplied classpath resources.static List<ClasspathRootSelector> selectClasspathRoots(Set<Path> classpathRoots) Create a list ofClasspathRootSelectorsfor the supplied classpath roots (directories or JAR files).static DirectorySelectorselectDirectory(File directory) Create aDirectorySelectorfor the supplied directory.static DirectorySelectorselectDirectory(String path) Create aDirectorySelectorfor the supplied directory path.static FileSelectorselectFile(File file) Create aFileSelectorfor the supplied file.static FileSelectorselectFile(File file, FilePosition position) Create aFileSelectorfor the supplied file.static FileSelectorselectFile(String path) Create aFileSelectorfor the supplied file path.static FileSelectorselectFile(String path, FilePosition position) Create aFileSelectorfor the supplied file path.static IterationSelectorselectIteration(DiscoverySelector parentSelector, int... iterationIndices) Create anIterationSelectorfor the supplied parent selector and iteration indices.static MethodSelectorselectMethod(Class<?> javaClass, Method method) static MethodSelectorselectMethod(Class<?> javaClass, String methodName) Create aMethodSelectorfor the suppliedClassand method name.static MethodSelectorselectMethod(Class<?> javaClass, String methodName, Class<?>... parameterTypes) Create aMethodSelectorfor the suppliedClass, method name, and parameter types.static MethodSelectorselectMethod(Class<?> javaClass, String methodName, String parameterTypeNames) Create aMethodSelectorfor the suppliedClass, method name, and parameter type names.static MethodSelectorselectMethod(ClassLoader classLoader, String fullyQualifiedMethodName) Create aMethodSelectorfor the supplied fully qualified method name and class loader.static MethodSelectorselectMethod(ClassLoader classLoader, String className, String methodName) Create aMethodSelectorfor the supplied class name, method name, and class loader.static MethodSelectorselectMethod(ClassLoader classLoader, String className, String methodName, String parameterTypeNames) Create aMethodSelectorfor the supplied class name, method name, parameter type names, and class loader.static MethodSelectorselectMethod(String fullyQualifiedMethodName) Create aMethodSelectorfor the supplied fully qualified method name.static MethodSelectorselectMethod(String className, String methodName) Create aMethodSelectorfor the supplied class name and method name using the default class loader.static MethodSelectorselectMethod(String className, String methodName, Class<?>... parameterTypes) Create aMethodSelectorfor the supplied class name, method name, and parameter types.static MethodSelectorselectMethod(String className, String methodName, String parameterTypeNames) Create aMethodSelectorfor the supplied class name, method name, and parameter type names.static ModuleSelectorselectModule(String moduleName) Create aModuleSelectorfor the supplied module name.static List<ModuleSelector> selectModules(Set<String> moduleNames) Create a list ofModuleSelectorsfor the supplied module names.static NestedClassSelectorselectNestedClass(ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName) Create aNestedClassSelectorfor the supplied class name, its enclosing classes' names, and class loader.static NestedClassSelectorselectNestedClass(List<Class<?>> enclosingClasses, Class<?> nestedClass) Create aNestedClassSelectorfor the supplied nestedClassand its enclosing classes.static NestedClassSelectorselectNestedClass(List<String> enclosingClassNames, String nestedClassName) Create aNestedClassSelectorfor the supplied class name and its enclosing classes' names.static NestedMethodSelectorselectNestedMethod(ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName, String methodName) Create aNestedMethodSelectorfor the supplied nested class name, method name, and class loader.static NestedMethodSelectorselectNestedMethod(ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName, String methodName, String parameterTypeNames) Create aNestedMethodSelectorfor the supplied nested class name, method name, parameter type names, and class loader.static NestedMethodSelectorselectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, Method method) static NestedMethodSelectorselectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, String methodName) Create aNestedMethodSelectorfor the supplied nestedClassand method name.static NestedMethodSelectorselectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, String methodName, Class<?>... parameterTypes) Create aNestedMethodSelectorfor the supplied enclosing classes, nested class, method name, and parameter types.static NestedMethodSelectorselectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, String methodName, String parameterTypeNames) Create aNestedMethodSelectorfor the suppliedClass, method name, and parameter type names.static NestedMethodSelectorselectNestedMethod(List<String> enclosingClassNames, String nestedClassName, String methodName) Create aNestedMethodSelectorfor the supplied nested class name and method name.static NestedMethodSelectorselectNestedMethod(List<String> enclosingClassNames, String nestedClassName, String methodName, Class<?>... parameterTypes) Create aNestedMethodSelectorfor the supplied enclosing class names, nested class name, method name, and parameter types.static NestedMethodSelectorselectNestedMethod(List<String> enclosingClassNames, String nestedClassName, String methodName, String parameterTypeNames) Create aNestedMethodSelectorfor the supplied nested class name, method name, and parameter type names.static PackageSelectorselectPackage(String packageName) Create aPackageSelectorfor the supplied package name.static UniqueIdSelectorselectUniqueId(String uniqueId) Create aUniqueIdSelectorfor the supplied unique ID.static UniqueIdSelectorselectUniqueId(UniqueId uniqueId) Create aUniqueIdSelectorfor the suppliedUniqueId.static UriSelectorCreate aUriSelectorfor the supplied URI.static UriSelectorCreate aUriSelectorfor the suppliedURI.
-
Method Details
-
selectUri
Create aUriSelectorfor the supplied URI.- Parameters:
uri- the URI to select; nevernullor blank- See Also:
-
selectUri
Create aUriSelectorfor the suppliedURI.- Parameters:
uri- the URI to select; nevernull- See Also:
-
selectFile
Create aFileSelectorfor the supplied file path.This method selects the file using the supplied path as is, without verifying if the file exists.
- Parameters:
path- the path to the file to select; nevernullor blank- See Also:
-
selectFile
Create aFileSelectorfor the supplied file.This method selects the file in its canonical form and throws a
PreconditionViolationExceptionif the file does not exist.- Parameters:
file- the file to select; nevernull- See Also:
-
selectFile
Create aFileSelectorfor the supplied file path.This method selects the file using the supplied path as is, without verifying if the file exists.
- Parameters:
path- the path to the file to select; nevernullor blankposition- the position inside the file; may benull- See Also:
-
selectFile
Create aFileSelectorfor the supplied file.This method selects the file in its canonical form and throws a
PreconditionViolationExceptionif the file does not exist.- Parameters:
file- the file to select; nevernullposition- the position inside the file; may benull- See Also:
-
selectDirectory
Create aDirectorySelectorfor the supplied directory path.This method selects the directory using the supplied path as is, without verifying if the directory exists.
- Parameters:
path- the path to the directory to select; nevernullor blank- See Also:
-
selectDirectory
Create aDirectorySelectorfor the supplied directory.This method selects the directory in its canonical form and throws a
PreconditionViolationExceptionif the directory does not exist.- Parameters:
directory- the directory to select; nevernull- See Also:
-
selectClasspathRoots
Create a list ofClasspathRootSelectorsfor the supplied classpath roots (directories or JAR files).Since the supplied paths are converted to
URIs, theFileSystemthat created them must be the default or one that has been created by an installedFileSystemProvider.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.
- Parameters:
classpathRoots- set of directories and JAR files in the filesystem that represent classpath roots; nevernull- Returns:
- a list of selectors for the supplied classpath roots; elements which do not physically exist in the filesystem will be filtered out
- See Also:
-
selectClasspathResource
Create aClasspathResourceSelectorfor 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.
- Parameters:
classpathResourceName- the name of the classpath resource; nevernullor blank- See Also:
-
selectClasspathResource
public static ClasspathResourceSelector selectClasspathResource(String classpathResourceName, FilePosition position) Create aClasspathResourceSelectorfor 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.
- Parameters:
classpathResourceName- the name of the classpath resource; nevernullor blankposition- the position inside the classpath resource; may benull- See Also:
-
selectClasspathResource
@API(status=EXPERIMENTAL, since="1.12") public static ClasspathResourceSelector selectClasspathResource(Set<Resource> classpathResources) Create aClasspathResourceSelectorfor the supplied classpath resources.Since engines are not expected to modify the classpath, the supplied resource must be on the classpath of the context class loader of the thread that uses the resulting selector.
Note: Since Java 9, all resources are on the module path. Either in named or unnamed modules. These resources are also considered to be classpath resources.
- Parameters:
classpathResources- a set of classpath resources; nevernullor empty. All resources must have the same name, may not benullor blank.- Since:
- 1.12
- See Also:
-
selectModule
Create aModuleSelectorfor the supplied module name.The unnamed module is not supported.
- Parameters:
moduleName- the module name to select; nevernullor blank- Since:
- 1.1
- See Also:
-
selectModules
@API(status=STABLE, since="1.10") public static List<ModuleSelector> selectModules(Set<String> moduleNames) Create a list ofModuleSelectorsfor the supplied module names.The unnamed module is not supported.
- Parameters:
moduleNames- the module names to select; nevernull, never containingnullor blank- Since:
- 1.1
- See Also:
-
selectPackage
Create aPackageSelectorfor the supplied package name.The default package is represented by an empty string (
"").- Parameters:
packageName- the package name to select; nevernulland never containing whitespace only- See Also:
-
selectClass
Create aClassSelectorfor the suppliedClass.- Parameters:
clazz- the class to select; nevernull- See Also:
-
selectClass
Create aClassSelectorfor the supplied class name.- Parameters:
className- the fully qualified name of the class to select; nevernullor blank- See Also:
-
selectClass
@API(status=EXPERIMENTAL, since="1.10") public static ClassSelector selectClass(ClassLoader classLoader, String className) Create aClassSelectorfor the supplied class name and class loader.- Parameters:
classLoader- the class loader to use to load the class, ornullto signal that the defaultClassLoadershould be usedclassName- the fully qualified name of the class to select; nevernullor blank- Since:
- 1.10
- See Also:
-
selectMethod
public static MethodSelector selectMethod(String fullyQualifiedMethodName) throws PreconditionViolationException Create aMethodSelectorfor 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.,
[[Iforint[][],[Ljava.lang.String;forjava.lang.String[], etc.) or source code syntax (e.g.,int[][],java.lang.String[], etc.).Examples Method Fully Qualified Method Name java.lang.String.chars()java.lang.String#charsjava.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[][])- Parameters:
fullyQualifiedMethodName- the fully qualified name of the method to select; nevernullor blank- Throws:
PreconditionViolationException- See Also:
-
selectMethod
@API(status=EXPERIMENTAL, since="1.10") public static MethodSelector selectMethod(ClassLoader classLoader, String fullyQualifiedMethodName) throws PreconditionViolationException Create aMethodSelectorfor the supplied fully qualified method name and class loader.See
selectMethod(String)for the supported formats for a fully qualified method name.- Parameters:
classLoader- the class loader to use to load the method's declaring class, ornullto signal that the defaultClassLoadershould be usedfullyQualifiedMethodName- the fully qualified name of the method to select; nevernullor blank- Throws:
PreconditionViolationException- Since:
- 1.10
- See Also:
-
selectMethod
Create aMethodSelectorfor the supplied class name and method name using the default class loader.- Parameters:
className- the fully qualified name of the class in which the method is declared, or a subclass thereof; nevernullor blankmethodName- the name of the method to select; nevernullor blank- See Also:
-
selectMethod
@API(status=EXPERIMENTAL, since="1.10") public static MethodSelector selectMethod(ClassLoader classLoader, String className, String methodName) Create aMethodSelectorfor the supplied class name, method name, and class loader.- Parameters:
classLoader- the class loader to use to load the class, ornullto signal that the defaultClassLoadershould be usedclassName- the fully qualified name of the class in which the method is declared, or a subclass thereof; nevernullor blankmethodName- the name of the method to select; nevernullor blank- Since:
- 1.10
- See Also:
-
selectMethod
public static MethodSelector selectMethod(String className, String methodName, String parameterTypeNames) Create aMethodSelectorfor the supplied class name, method name, and parameter type names.The parameter type names
Stringis 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.- Parameters:
className- the fully qualified name of the class in which the method is declared, or a subclass thereof; nevernullor blankmethodName- the name of the method to select; nevernullor blankparameterTypeNames- the parameter type names as a single string; nevernullthough potentially an empty string if the method does not declare parameters- See Also:
-
selectMethod
@API(status=EXPERIMENTAL, since="1.10") public static MethodSelector selectMethod(ClassLoader classLoader, String className, String methodName, String parameterTypeNames) Create aMethodSelectorfor the supplied class name, method name, parameter type names, and class loader.The parameter type names
Stringis 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.- Parameters:
classLoader- the class loader to use to load the class, ornullto signal that the defaultClassLoadershould be usedclassName- the fully qualified name of the class in which the method is declared, or a subclass thereof; nevernullor blankmethodName- the name of the method to select; nevernullor blankparameterTypeNames- the parameter type names as a single string; nevernullthough potentially an empty string if the method does not declare any parameters- Since:
- 1.10
- See Also:
-
selectMethod
Create aMethodSelectorfor the suppliedClassand method name.- Parameters:
javaClass- the class in which the method is declared, or a subclass thereof; nevernullmethodName- the name of the method to select; nevernullor blank- See Also:
-
selectMethod
public static MethodSelector selectMethod(Class<?> javaClass, String methodName, String parameterTypeNames) Create aMethodSelectorfor the suppliedClass, method name, and parameter type names.The parameter type names
Stringis 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.- Parameters:
javaClass- the class in which the method is declared, or a subclass thereof; nevernullmethodName- the name of the method to select; nevernullor blankparameterTypeNames- the parameter type names as a single string; nevernullthough potentially an empty string if the method does not declare any parameters- See Also:
-
selectMethod
@API(status=EXPERIMENTAL, since="1.10") public static MethodSelector selectMethod(String className, String methodName, Class<?>... parameterTypes) Create aMethodSelectorfor the supplied class name, method name, and parameter types.- Parameters:
className- the fully qualified name of the class in which the method is declared, or a subclass thereof; nevernullor blankmethodName- the name of the method to select; nevernullor blankparameterTypes- the formal parameter types of the method; nevernullthough potentially empty if the method does not declare parameters- Since:
- 1.10
- See Also:
-
selectMethod
@API(status=EXPERIMENTAL, since="1.10") public static MethodSelector selectMethod(Class<?> javaClass, String methodName, Class<?>... parameterTypes) Create aMethodSelectorfor the suppliedClass, method name, and parameter types.- Parameters:
javaClass- the class in which the method is declared, or a subclass thereof; nevernullmethodName- the name of the method to select; nevernullor blankparameterTypes- the formal parameter types of the method; nevernullthough potentially empty if the method does not declare parameters- Since:
- 1.10
- See Also:
-
selectMethod
- Parameters:
javaClass- the class in which the method is declared, or a subclass thereof; nevernullmethod- the method to select; nevernull- See Also:
-
selectNestedClass
@API(status=STABLE, since="1.6") public static NestedClassSelector selectNestedClass(List<Class<?>> enclosingClasses, Class<?> nestedClass) Create aNestedClassSelectorfor the supplied nestedClassand its enclosing classes.- Parameters:
enclosingClasses- the path to the nested class to select; nevernullor emptynestedClass- the nested class to select; nevernull- Since:
- 1.6
- See Also:
-
selectNestedClass
@API(status=STABLE, since="1.6") public static NestedClassSelector selectNestedClass(List<String> enclosingClassNames, String nestedClassName) Create aNestedClassSelectorfor the supplied class name and its enclosing classes' names.- Parameters:
enclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blank- Since:
- 1.6
- See Also:
-
selectNestedClass
@API(status=EXPERIMENTAL, since="1.10") public static NestedClassSelector selectNestedClass(ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName) Create aNestedClassSelectorfor the supplied class name, its enclosing classes' names, and class loader.- Parameters:
classLoader- the class loader to use to load the enclosing and nested classes, ornullto signal that the defaultClassLoadershould be usedenclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blank- Since:
- 1.10
- See Also:
-
selectNestedMethod
@API(status=STABLE, since="1.6") public static NestedMethodSelector selectNestedMethod(List<String> enclosingClassNames, String nestedClassName, String methodName) Create aNestedMethodSelectorfor the supplied nested class name and method name.- Parameters:
enclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blankmethodName- the name of the method to select; nevernullor blank- Since:
- 1.6
- See Also:
-
selectNestedMethod
@API(status=EXPERIMENTAL, since="1.10") public static NestedMethodSelector selectNestedMethod(ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName, String methodName) throws PreconditionViolationException Create aNestedMethodSelectorfor the supplied nested class name, method name, and class loader.- Parameters:
classLoader- the class loader to use to load the method's declaring class, ornullto signal that the defaultClassLoadershould be usedenclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blankmethodName- the name of the method to select; nevernullor blank- Throws:
PreconditionViolationException- Since:
- 1.10
- See Also:
-
selectNestedMethod
@API(status=STABLE, since="1.6") public static NestedMethodSelector selectNestedMethod(List<String> enclosingClassNames, String nestedClassName, String methodName, String parameterTypeNames) Create aNestedMethodSelectorfor the supplied nested class name, method name, and parameter type names.The parameter type names
Stringis 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.- Parameters:
enclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blankmethodName- the name of the method to select; nevernullor blankparameterTypeNames- the parameter type names as a single string; nevernullthough potentially an empty string if the method does not declare parameters- Since:
- 1.6
- See Also:
-
selectNestedMethod
@API(status=EXPERIMENTAL, since="1.10") public static NestedMethodSelector selectNestedMethod(ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName, String methodName, String parameterTypeNames) Create aNestedMethodSelectorfor the supplied nested class name, method name, parameter type names, and class loader.- Parameters:
classLoader- the class loader to use to load the method's declaring class, ornullto signal that the defaultClassLoadershould be usedenclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blankmethodName- the name of the method to select; nevernullor blankparameterTypeNames- the parameter type names as a single string; nevernullthough potentially an empty string if the method does not declare parameters- Since:
- 1.10
- See Also:
-
selectNestedMethod
@API(status=EXPERIMENTAL, since="1.10") public static NestedMethodSelector selectNestedMethod(List<String> enclosingClassNames, String nestedClassName, String methodName, Class<?>... parameterTypes) Create aNestedMethodSelectorfor the supplied enclosing class names, nested class name, method name, and parameter types.- Parameters:
enclosingClassNames- the names of the enclosing classes; nevernullor emptynestedClassName- the name of the nested class to select; nevernullor blankmethodName- the name of the method to select; nevernullor blankparameterTypes- the formal parameter types of the method; nevernullthough potentially empty if the method does not declare parameters- Since:
- 1.10
- See Also:
-
selectNestedMethod
@API(status=STABLE, since="1.6") public static NestedMethodSelector selectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, String methodName) Create aNestedMethodSelectorfor the supplied nestedClassand method name.- Parameters:
enclosingClasses- the path to the nested class to select; nevernullor emptynestedClass- the nested class to select; nevernullmethodName- the name of the method to select; nevernullor blank- Since:
- 1.6
- See Also:
-
selectNestedMethod
@API(status=STABLE, since="1.6") public static NestedMethodSelector selectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, String methodName, String parameterTypeNames) Create aNestedMethodSelectorfor the suppliedClass, method name, and parameter type names.The parameter type names
Stringis 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.- Parameters:
enclosingClasses- the path to the nested class to select; nevernullor emptynestedClass- the nested class to select; nevernullmethodName- the name of the method to select; nevernullor blankparameterTypeNames- the parameter type names as a single string; nevernullthough potentially an empty string if the method does not declare parameters- Since:
- 1.6
- See Also:
-
selectNestedMethod
@API(status=EXPERIMENTAL, since="1.10") public static NestedMethodSelector selectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, String methodName, Class<?>... parameterTypes) Create aNestedMethodSelectorfor the supplied enclosing classes, nested class, method name, and parameter types.- Parameters:
enclosingClasses- the path to the nested class to select; nevernullor emptynestedClass- the nested class to select; nevernullmethodName- the name of the method to select; nevernullor blankparameterTypes- the formal parameter types of the method; nevernullthough potentially empty if the method does not declare parameters- Since:
- 1.10
- See Also:
-
selectNestedMethod
@API(status=STABLE, since="1.6") public static NestedMethodSelector selectNestedMethod(List<Class<?>> enclosingClasses, Class<?> nestedClass, Method method) - Parameters:
enclosingClasses- the path to the nested class to select; nevernullor emptynestedClass- the nested class to select; nevernullmethod- the method to select; nevernull- Since:
- 1.6
- See Also:
-
selectUniqueId
Create aUniqueIdSelectorfor the suppliedUniqueId.- Parameters:
uniqueId- theUniqueIdto select; nevernull- See Also:
-
selectUniqueId
Create aUniqueIdSelectorfor the supplied unique ID.- Parameters:
uniqueId- the unique ID to select; nevernullor blank- See Also:
-
selectIteration
@API(status=EXPERIMENTAL, since="1.9") public static IterationSelector selectIteration(DiscoverySelector parentSelector, int... iterationIndices) Create anIterationSelectorfor the supplied parent selector and iteration indices.- Parameters:
parentSelector- the parent selector to select iterations for; nevernulliterationIndices- the iteration indices to select; nevernullor empty- Since:
- 1.9
- See Also:
-
parse
@API(status=EXPERIMENTAL, since="1.11") public static Optional<? extends DiscoverySelector> parse(String identifier) Parse the supplied string representation of aDiscoverySelectorIdentifier.- Parameters:
identifier- the string representation of aDiscoverySelectorIdentifier; nevernullor blank- Returns:
- an
Optionalcontaining the correspondingDiscoverySelector; nevernullbut potentially empty - Since:
- 1.11
- See Also:
-
parse
@API(status=EXPERIMENTAL, since="1.11") public static Optional<? extends DiscoverySelector> parse(DiscoverySelectorIdentifier identifier) Parse the suppliedDiscoverySelectorIdentifier.- Parameters:
identifier- theDiscoverySelectorIdentifierto parse; nevernull- Returns:
- an
Optionalcontaining the correspondingDiscoverySelector; nevernullbut potentially empty - Since:
- 1.11
- See Also:
-
parseAll
@API(status=EXPERIMENTAL, since="1.11") public static Stream<? extends DiscoverySelector> parseAll(String... identifiers) Parse the supplied string representations ofDiscoverySelectorIdentifiers.- Parameters:
identifiers- the string representations ofDiscoverySelectorIdentifiersto parse; nevernull- Returns:
- a stream of the corresponding
DiscoverySelectors; nevernullbut potentially empty - Since:
- 1.11
- See Also:
-
parseAll
@API(status=EXPERIMENTAL, since="1.11") public static Stream<? extends DiscoverySelector> parseAll(Collection<DiscoverySelectorIdentifier> identifiers) Parse the suppliedDiscoverySelectorIdentifiers.- Parameters:
identifiers- theDiscoverySelectorIdentifiersto parse; nevernull- Returns:
- a stream of the corresponding
DiscoverySelectors; nevernullbut potentially empty - Since:
- 1.11
- See Also:
-