Module org.junit.platform.engine
Class ExcludeClassNameFilter
- java.lang.Object
-
- org.junit.platform.engine.discovery.AbstractClassNameFilter
-
- org.junit.platform.engine.discovery.ExcludeClassNameFilter
-
- All Implemented Interfaces:
ClassNameFilter
,DiscoveryFilter<java.lang.String>
,Filter<java.lang.String>
class ExcludeClassNameFilter extends AbstractClassNameFilter
ClassNameFilter
that matches fully qualified class names against patterns in the form of regular expressions.If the fully qualified name of a class matches against at least one pattern, the class will be excluded.
- Since:
- 1.0
-
-
Field Summary
-
Fields inherited from class org.junit.platform.engine.discovery.AbstractClassNameFilter
patternDescription, patterns
-
Fields inherited from interface org.junit.platform.engine.discovery.ClassNameFilter
STANDARD_INCLUDE_PATTERN
-
-
Constructor Summary
Constructors Constructor Description ExcludeClassNameFilter(java.lang.String... patterns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterResult
apply(java.lang.String className)
Apply this filter to the supplied object.private java.lang.String
formatExclusionReason(java.lang.String className, java.util.regex.Pattern pattern)
private java.lang.String
formatInclusionReason(java.lang.String className)
java.util.function.Predicate<java.lang.String>
toPredicate()
Return aPredicate
that returnstrue
if this filter includes the object supplied to the predicate'stest
method.java.lang.String
toString()
-
Methods inherited from class org.junit.platform.engine.discovery.AbstractClassNameFilter
findMatchingPattern
-
-
-
-
Method Detail
-
apply
public FilterResult apply(java.lang.String className)
Description copied from interface:Filter
Apply this filter to the supplied object.
-
formatInclusionReason
private java.lang.String formatInclusionReason(java.lang.String className)
-
formatExclusionReason
private java.lang.String formatExclusionReason(java.lang.String className, java.util.regex.Pattern pattern)
-
toPredicate
public java.util.function.Predicate<java.lang.String> toPredicate()
Description copied from interface:Filter
Return aPredicate
that returnstrue
if this filter includes the object supplied to the predicate'stest
method.- Specified by:
toPredicate
in interfaceFilter<java.lang.String>
- Specified by:
toPredicate
in classAbstractClassNameFilter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-