Class ExcludePackageNameFilter
- java.lang.Object
-
- org.junit.platform.engine.discovery.ExcludePackageNameFilter
-
- All Implemented Interfaces:
PackageNameFilter,DiscoveryFilter<java.lang.String>,Filter<java.lang.String>
class ExcludePackageNameFilter extends java.lang.Object implements PackageNameFilter
PackageNameFilterthat matches fully qualified package names that are not prefixed by one of the package names provided to the filter.If the fully qualified name of a package starts with at least one of the packages names of the filter, the package will be excluded.
- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>packageNamesprivate java.lang.StringpatternDescription
-
Constructor Summary
Constructors Constructor Description ExcludePackageNameFilter(java.lang.String... packageNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterResultapply(java.lang.String packageName)Apply this filter to the supplied object.private java.util.Optional<java.lang.String>findMatchingName(java.lang.String packageName)private java.lang.StringformatExclusionReason(java.lang.String packageName, java.lang.String matchedName)private java.lang.StringformatInclusionReason(java.lang.String packageName)java.util.function.Predicate<java.lang.String>toPredicate()Return aPredicatethat returnstrueif this filter includes the object supplied to the predicate'stestmethod.java.lang.StringtoString()
-
-
-
Method Detail
-
apply
public FilterResult apply(java.lang.String packageName)
Description copied from interface:FilterApply this filter to the supplied object.
-
formatInclusionReason
private java.lang.String formatInclusionReason(java.lang.String packageName)
-
formatExclusionReason
private java.lang.String formatExclusionReason(java.lang.String packageName, java.lang.String matchedName)
-
toPredicate
public java.util.function.Predicate<java.lang.String> toPredicate()
Description copied from interface:FilterReturn aPredicatethat returnstrueif this filter includes the object supplied to the predicate'stestmethod.- Specified by:
toPredicatein interfaceFilter<java.lang.String>
-
findMatchingName
private java.util.Optional<java.lang.String> findMatchingName(java.lang.String packageName)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-