class IncludePackageNameFilter extends java.lang.Object implements PackageNameFilter
PackageNameFilter that matches fully qualified package names that
are 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 included.
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<java.lang.String> |
packageNames |
private java.lang.String |
patternDescription |
| Constructor and Description |
|---|
IncludePackageNameFilter(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) |
private java.lang.String |
formatInclusionReason(java.lang.String packageName,
java.lang.String matchedName) |
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, waitexcludePackageNames, excludePackageNames, includePackageNames, includePackageNamesadaptFilter, composeFilters, composeFiltersprivate final java.util.List<java.lang.String> packageNames
private final java.lang.String patternDescription
IncludePackageNameFilter(java.lang.String... packageNames)
public FilterResult apply(java.lang.String packageName)
Filterprivate java.lang.String formatInclusionReason(java.lang.String packageName,
java.lang.String matchedName)
private java.lang.String formatExclusionReason(java.lang.String packageName)
public java.util.function.Predicate<java.lang.String> toPredicate()
FilterPredicate 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