Interface ClassNameFilter
-
- All Superinterfaces:
DiscoveryFilter<java.lang.String>
,Filter<java.lang.String>
@API(status=STABLE, since="1.0") public interface ClassNameFilter extends DiscoveryFilter<java.lang.String>
DiscoveryFilter
that is applied to the name of aClass
.- Since:
- 1.0
- See Also:
includeClassNamePatterns(java.lang.String...)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STANDARD_INCLUDE_PATTERN
Standard include pattern in the form of a regular expression that is used to match against fully qualified class names: "^.*Tests?$" which matches against class names ending inTest
orTests
(in any package).
-
Method Summary
All Methods Static Methods Default Methods Modifier and Type Method Description static ClassNameFilter
excludeClassNamePatterns(java.lang.String... patterns)
Create a new excludeClassNameFilter
based on the supplied patterns.static ClassNameFilter
includeClassNamePatterns(java.lang.String... patterns)
Create a new includeClassNameFilter
based on the supplied patterns.-
Methods inherited from interface org.junit.platform.engine.Filter
adaptFilter, apply, composeFilters, composeFilters, toPredicate
-
-
-
-
Field Detail
-
STANDARD_INCLUDE_PATTERN
static final java.lang.String STANDARD_INCLUDE_PATTERN
Standard include pattern in the form of a regular expression that is used to match against fully qualified class names: "^.*Tests?$" which matches against class names ending inTest
orTests
(in any package).- See Also:
- Constant Field Values
-
-
Method Detail
-
includeClassNamePatterns
static ClassNameFilter includeClassNamePatterns(java.lang.String... patterns)
Create a new includeClassNameFilter
based on the supplied patterns.The patterns are combined using OR semantics, i.e. if the fully qualified name of a class matches against at least one of the patterns, the class will be included in the result set.
- Parameters:
patterns
- regular expressions to match against fully qualified class names; nevernull
, empty, or containingnull
- See Also:
Class.getName()
-
excludeClassNamePatterns
static ClassNameFilter excludeClassNamePatterns(java.lang.String... patterns)
Create a new excludeClassNameFilter
based on the supplied patterns.The patterns are combined using OR semantics, i.e. if the fully qualified name of a class matches against at least one of the patterns, the class will be excluded from the result set.
- Parameters:
patterns
- regular expressions to match against fully qualified class names; nevernull
, empty, or containingnull
- See Also:
Class.getName()
-
-