Top Description Fields Constructors Methods
org.junit.platform.engine.discovery

pack-priv Class IncludePackageNameFilter

extends Object
implements PackageNameFilter
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.discovery.PackageNameFilter, org.junit.platform.engine.DiscoveryFilter, org.junit.platform.engine.Filter
Static Imports
java.util.stream.Collectors.joining, org.junit.platform.engine.FilterResult.excluded, .FilterResult.included

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.

Since
1.0

Field Summary

Modifier and TypeField and Description
private final List<String>
private final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public FilterResult
apply(String packageName)

Implements org.junit.platform.engine.Filter.apply.

Apply this filter to the supplied object.

private Optional<String>
findMatchingName(String packageName)

private String
private String
formatInclusionReason(String packageName, String matchedName)

public Predicate<String>
toPredicate()

Overrides default org.junit.platform.engine.Filter.toPredicate.

Return a Predicate that returns true if this filter includes the object supplied to the predicate's test method.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

packageNamesback to summary
private final List<String> packageNames
patternDescriptionback to summary
private final String patternDescription

Constructor Detail

IncludePackageNameFilterback to summary
pack-priv IncludePackageNameFilter(String... packageNames)

Method Detail

applyback to summary
public FilterResult apply(String packageName)

Implements org.junit.platform.engine.Filter.apply.

Doc from org.junit.platform.engine.Filter.apply.

Apply this filter to the supplied object.

Annotations
@Override
findMatchingNameback to summary
private Optional<String> findMatchingName(String packageName)
formatExclusionReasonback to summary
private String formatExclusionReason(String packageName)
formatInclusionReasonback to summary
private String formatInclusionReason(String packageName, String matchedName)
toPredicateback to summary
public Predicate<String> toPredicate()

Overrides default org.junit.platform.engine.Filter.toPredicate.

Doc from org.junit.platform.engine.Filter.toPredicate.

Return a Predicate that returns true if this filter includes the object supplied to the predicate's test method.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override