class ExcludePackageNameFilter extends java.lang.Object implements PackageNameFilter
PackageNameFilter
that 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.
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
packageNames |
private java.lang.String |
patternDescription |
Constructor and Description |
---|
ExcludePackageNameFilter(java.lang.String... packageNames) |
Modifier and Type | Method and Description |
---|---|
FilterResult |
apply(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.String |
formatExclusionReason(java.lang.String packageName,
java.lang.String matchedName) |
private java.lang.String |
formatInclusionReason(java.lang.String packageName) |
java.util.function.Predicate<java.lang.String> |
toPredicate()
Return a
Predicate that returns true if this filter
includes the object supplied to the predicate's
test method. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
excludePackageNames, excludePackageNames, includePackageNames, includePackageNames
adaptFilter, composeFilters, composeFilters
private final java.util.List<java.lang.String> packageNames
private final java.lang.String patternDescription
ExcludePackageNameFilter(java.lang.String... packageNames)
public FilterResult apply(java.lang.String packageName)
Filter
private java.lang.String formatInclusionReason(java.lang.String packageName)
private java.lang.String formatExclusionReason(java.lang.String packageName, java.lang.String matchedName)
public java.util.function.Predicate<java.lang.String> toPredicate()
Filter
Predicate
that returns true
if this filter
includes the object supplied to the predicate's
test
method.toPredicate
in interface Filter<java.lang.String>
private java.util.Optional<java.lang.String> findMatchingName(java.lang.String packageName)
public java.lang.String toString()
toString
in class java.lang.Object