static factory methods for creating
DiscoverySelectors.
UriSelector, FileSelector, DirectorySelector, ClasspathRootSelector, ClasspathResourceSelector, ModuleSelector, PackageSelector, ClassSelector, MethodSelector, NestedClassSelector, NestedMethodSelector, UniqueIdSelector, DiscoverySelectorIdentifier
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Optional | Returns: anOptional containing the corresponding DiscoverySelector;
never null but potentially emptythe string representation of a identifier)DiscoverySelectorIdentifier;
never null or blankParse the supplied string representation of a |
| public static Optional | Returns: anOptional containing the corresponding DiscoverySelector;
never null but potentially emptythe identifier)DiscoverySelectorIdentifier to parse;
never nullParse the supplied |
| public static Stream | parseAll(String...
the string representations of
identifiers)DiscoverySelectorIdentifiers to parse; never nullParse the supplied string representations of
|
| public static Stream | parseAll(Collection<DiscoverySelectorIdentifier>
the identifiers)DiscoverySelectorIdentifiers to parse;
never nullParse the supplied |
| public static ClassSelector | selectClass(Class<?>
the class to select; never clazz)nullCreate a |
| public static ClassSelector | selectClass(String
the fully qualified name of the class to select; never
className)null or blankCreate a |
| public static ClassSelector | selectClass(@Nullable ClassLoader
the class loader to use to load the class, or classLoader, String null
to signal that the default ClassLoader should be usedthe fully qualified name of the class to select; never
className)null or blankCreate a |
| public static List | selectClasses(Class<?>...
the classes to select; never classes)null and never containing
null class referencesCreate a |
| public static List | selectClasses(List<Class<?>>
the classes to select; never classes)null and never containing
null class referencesCreate a |
| public static List | selectClassesByName(String...
the fully qualified names of the classes to select;
never classNames)null and never containing null or blank namesCreate a |
| public static List | selectClassesByName(List<String>
the fully qualified names of the classes to select;
never classNames)null and never containing null or blank namesCreate a |
| public static List | selectClassesByName(@Nullable ClassLoader
the class loader to use to load the classes, or classLoader, String... null
to signal that the default ClassLoader should be usedthe fully qualified names of the classes to select;
never classNames)null and never containing null or blank namesCreate a |
| public static List | selectClassesByName(@Nullable ClassLoader
the class loader to use to load the classes, or classLoader, List<String> null
to signal that the default ClassLoader should be usedthe fully qualified names of the classes to select;
never classNames)null and never containing null or blank namesCreate a |
| public static ClasspathResourceSelector | selectClasspathResource(String
the name of the classpath resource; never
classpathResourceName)null or blankCreate a |
| public static ClasspathResourceSelector | selectClasspathResource(String
the name of the classpath resource; never
classpathResourceName, @Nullable FilePosition null or blankthe position inside the classpath resource; may be position)nullCreate a |
| public static ClasspathResourceSelector | selectClasspathResource(Set<Resource>
a set of classpath resources; never
classpathResources)null or empty. All resources must have the same name, may not
be null or blank.
Deprecated
for removal since 1.14. Please use
selectClasspathResourceByName(Set) instead.
Create a |
| public static ClasspathResourceSelector | selectClasspathResourceByName(Set<? extends Resource>
a set of classpath resources; never
classpathResources)null or empty. All resources must have the same name, may not
be null or blank.Create a |
| public static List | Returns: a list of selectors for the supplied classpath roots; elements which do not physically exist in the filesystem will be filtered outset of directories and JAR files in the filesystem
that represent classpath roots; never classpathRoots)nullCreate a list of |
| public static DirectorySelector | selectDirectory(String
the path to the directory to select; never path)null or blankCreate a |
| public static DirectorySelector | selectDirectory(File
the directory to select; never directory)nullCreate a |
| public static FileSelector | selectFile(String
the path to the file to select; never path)null or blankCreate a |
| public static FileSelector | |
| public static FileSelector | selectFile(String
the path to the file to select; never path, @Nullable FilePosition null or blankthe position inside the file; may be position)nullCreate a |
| public static FileSelector | selectFile(File
the file to select; never file, @Nullable FilePosition nullthe position inside the file; may be position)nullCreate a |
| public static IterationSelector | selectIteration(DiscoverySelector
the parent selector to select iterations for; never
parentSelector, int... nullthe iteration indices to select; never iterationIndices)null
or emptyCreate an |
| public static MethodSelector | selectMethod(String
the fully qualified name of the method to
select; never fullyQualifiedMethodName)null or blankCreate a |
| public static MethodSelector | selectMethod(@Nullable ClassLoader
the class loader to use to load the method's declaring
class, or classLoader, String null to signal that the default ClassLoader
should be usedthe fully qualified name of the method to
select; never fullyQualifiedMethodName)null or blankCreate a |
| public static MethodSelector | selectMethod(String
the fully qualified name of the class in which the method
is declared, or a subclass thereof; never className, String null or blankthe name of the method to select; never methodName)null or blankCreate a |
| public static MethodSelector | selectMethod(@Nullable ClassLoader
the class loader to use to load the class, or classLoader, String null
to signal that the default ClassLoader should be usedthe fully qualified name of the class in which the method
is declared, or a subclass thereof; never className, String null or blankthe name of the method to select; never methodName)null or blankCreate a |
| public static MethodSelector | selectMethod(String
the fully qualified name of the class in which the method
is declared, or a subclass thereof; never className, String null or blankthe name of the method to select; never methodName, String null or blankthe parameter type names as a single string; never
parameterTypeNames)null though potentially an empty string if the method does not declare
parametersCreate a |
| public static MethodSelector | selectMethod(@Nullable ClassLoader
the class loader to use to load the class, or classLoader, String null
to signal that the default ClassLoader should be usedthe fully qualified name of the class in which the method
is declared, or a subclass thereof; never className, String null or blankthe name of the method to select; never methodName, String null or blankthe parameter type names as a single string; never
parameterTypeNames)null though potentially an empty string if the method does not declare
any parametersCreate a |
| public static MethodSelector | selectMethod(Class<?>
the class in which the method is declared, or a subclass thereof;
never javaClass, String nullthe name of the method to select; never methodName)null or blankCreate a |
| public static MethodSelector | selectMethod(Class<?>
the class in which the method is declared, or a subclass thereof;
never javaClass, String nullthe name of the method to select; never methodName, String null or blankthe parameter type names as a single string; never
parameterTypeNames)null though potentially an empty string if the method does not declare
any parametersCreate a |
| public static MethodSelector | selectMethod(String
the fully qualified name of the class in which the method
is declared, or a subclass thereof; never className, String null or blankthe name of the method to select; never methodName, Class<?>... null or blankthe formal parameter types of the method; never
parameterTypes)null though potentially empty if the method does not declare parametersCreate a |
| public static MethodSelector | selectMethod(Class<?>
the class in which the method is declared, or a subclass thereof;
never javaClass, String nullthe name of the method to select; never methodName, Class<?>... null or blankthe formal parameter types of the method; never
parameterTypes)null though potentially empty if the method does not declare parametersCreate a |
| public static MethodSelector | selectMethod(Class<?>
the class in which the method is declared, or a subclass thereof;
never javaClass, Method nullthe method to select; never method)null |
| public static ModuleSelector | selectModule(String
the module name to select; never moduleName)null or blankCreate a |
| public static List | selectModules(Set<String>
the module names to select; never moduleNames)null, never
containing null or blankCreate a list of |
| public static NestedClassSelector | selectNestedClass(List<Class<?>>
the path to the nested class to select; never enclosingClasses, Class<?> null or emptythe nested class to select; never nestedClass)nullCreate a |
| public static NestedClassSelector | selectNestedClass(List<String>
the names of the enclosing classes; never enclosingClassNames, String null or emptythe name of the nested class to select; never nestedClassName)null or blankCreate a |
| public static NestedClassSelector | selectNestedClass(@Nullable ClassLoader
the class loader to use to load the enclosing and nested classes, or
classLoader, List<String> null to signal that the default ClassLoader should be usedthe names of the enclosing classes; never enclosingClassNames, String null or emptythe name of the nested class to select; never nestedClassName)null or blankCreate a |
| public static NestedMethodSelector | selectNestedMethod(List<String>
the names of the enclosing classes; never enclosingClassNames, String null or emptythe name of the nested class to select; never nestedClassName, String null or blankthe name of the method to select; never methodName)null or blankCreate a |
| public static NestedMethodSelector | selectNestedMethod(@Nullable ClassLoader
the class loader to use to load the method's declaring
class, or classLoader, List<String> null to signal that the default ClassLoader
should be usedthe names of the enclosing classes; never enclosingClassNames, String null or emptythe name of the nested class to select; never nestedClassName, String null or blankthe name of the method to select; never methodName)null or blankCreate a |
| public static NestedMethodSelector | selectNestedMethod(List<String>
the names of the enclosing classes; never enclosingClassNames, String null or emptythe name of the nested class to select; never nestedClassName, String null or blankthe name of the method to select; never methodName, String null or blankthe parameter type names as a single string; never
parameterTypeNames)null though potentially an empty string if the method does not declare
parametersCreate a |
| public static NestedMethodSelector | selectNestedMethod(@Nullable ClassLoader
the class loader to use to load the method's declaring
class, or classLoader, List<String> null to signal that the default ClassLoader
should be usedthe names of the enclosing classes; never enclosingClassNames, String null or emptythe name of the nested class to select; never nestedClassName, String null or blankthe name of the method to select; never methodName, String null or blankthe parameter type names as a single string; never
parameterTypeNames)null though potentially an empty string if the method does not declare
parametersCreate a |
| public static NestedMethodSelector | selectNestedMethod(List<String>
the names of the enclosing classes; never enclosingClassNames, String null
or emptythe name of the nested class to select; never nestedClassName, String null
or blankthe name of the method to select; never methodName, Class<?>... null or blankthe formal parameter types of the method; never parameterTypes)null
though potentially empty if the method does not declare parametersCreate a |
| public static NestedMethodSelector | selectNestedMethod(List<Class<?>>
the path to the nested class to select; never enclosingClasses, Class<?> null or emptythe nested class to select; never nestedClass, String nullthe name of the method to select; never methodName)null or blankCreate a |
| public static NestedMethodSelector | selectNestedMethod(List<Class<?>>
the path to the nested class to select; never enclosingClasses, Class<?> null or emptythe nested class to select; never nestedClass, String nullthe name of the method to select; never methodName, String null or blankthe parameter type names as a single string; never
parameterTypeNames)null though potentially an empty string if the method does not declare
parametersCreate a |
| public static NestedMethodSelector | selectNestedMethod(List<Class<?>>
the path to the nested class to select; never enclosingClasses, Class<?> null
or emptythe nested class to select; never nestedClass, String nullthe name of the method to select; never methodName, Class<?>... null or blankthe formal parameter types of the method; never parameterTypes)null
though potentially empty if the method does not declare parametersCreate a |
| public static NestedMethodSelector | |
| public static PackageSelector | selectPackage(String
the package name to select; never packageName)null and
never containing whitespace onlyCreate a |
| public static UniqueIdSelector | selectUniqueId(UniqueId
the uniqueId)UniqueId to select; never nullCreate a |
| public static UniqueIdSelector | selectUniqueId(String
the unique ID to select; never uniqueId)null or blankCreate a |
| public static UriSelector | |
| public static UriSelector |