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 a Class
.includeClassNamePatterns(java.lang.String...)
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 in
Test or
Tests (in any package). |
Modifier and Type | Method | Description |
---|---|---|
static ClassNameFilter |
excludeClassNamePatterns(java.lang.String... patterns) |
Create a new exclude
ClassNameFilter based on the
supplied patterns. |
static ClassNameFilter |
includeClassNamePatterns(java.lang.String... patterns) |
Create a new include
ClassNameFilter based on the
supplied patterns. |
adaptFilter, apply, composeFilters, composeFilters, toPredicate
static final java.lang.String STANDARD_INCLUDE_PATTERN
Test
or
Tests
(in any package).static ClassNameFilter includeClassNamePatterns(java.lang.String... patterns)
ClassNameFilter
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.
patterns
- regular expressions to match against fully qualified
class names; never null
, empty, or containing null
Class.getName()
static ClassNameFilter excludeClassNamePatterns(java.lang.String... patterns)
ClassNameFilter
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.
patterns
- regular expressions to match against fully qualified
class names; never null
, empty, or containing null
Class.getName()