Top Description Inners Fields Constructors Methods
org.junit.platform.commons.util

public Class ClassNamePatternFilterUtils

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
since:1.7
Static Imports
org.apiguardian.api.API.Status.INTERNAL

Collection of utilities for creating filters based on class names.

DISCLAIMER

These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!

Since
1.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static List<Pattern>
private static <T> Predicate<T>
public static <T> Predicate<T>
excludeMatchingClasses(@Nullable String
a comma-separated list of patterns
patterns
)

Create a Predicate that can be used to exclude (i.e., filter out) objects of type T whose fully qualified class names match any of the supplied patterns.

public static Predicate<String>
excludeMatchingClassNames(@Nullable String
a comma-separated list of patterns
patterns
)

Create a Predicate that can be used to exclude (i.e., filter out) fully qualified class names matching any of the supplied patterns.

public static <T> Predicate<T>
includeMatchingClasses(@Nullable String
a comma-separated list of patterns
patterns
)

Create a Predicate that can be used to include (i.e., filter in) objects of type T whose fully qualified class names match any of the supplied patterns.

public static Predicate<String>
includeMatchingClassNames(@Nullable String
a comma-separated list of patterns
patterns
)

Create a Predicate that can be used to include (i.e., filter in) fully qualified class names matching any of the supplied patterns.

private static <T> Predicate<T>
private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALL_PATTERNback to summary
public static final String ALL_PATTERN
BLANKback to summary
public static final String BLANK

Constructor Detail

ClassNamePatternFilterUtilsback to summary
private ClassNamePatternFilterUtils()

Method Detail

convertToRegularExpressionsback to summary
private static List<Pattern> convertToRegularExpressions(String patterns)
createPredicateFromPatternsback to summary
private static <T> Predicate<T> createPredicateFromPatterns(String patterns, Function<T, String> classNameProvider, ClassNamePatternFilterUtils.FilterType type)
excludeMatchingClassesback to summary
public static <T> Predicate<T> excludeMatchingClasses(@Nullable String patterns)

Create a Predicate that can be used to exclude (i.e., filter out) objects of type T whose fully qualified class names match any of the supplied patterns.

Parameters
patterns:@Nullable String

a comma-separated list of patterns

excludeMatchingClassNamesback to summary
public static Predicate<String> excludeMatchingClassNames(@Nullable String patterns)

Create a Predicate that can be used to exclude (i.e., filter out) fully qualified class names matching any of the supplied patterns.

Parameters
patterns:@Nullable String

a comma-separated list of patterns

includeMatchingClassesback to summary
public static <T> Predicate<T> includeMatchingClasses(@Nullable String patterns)

Create a Predicate that can be used to include (i.e., filter in) objects of type T whose fully qualified class names match any of the supplied patterns.

Parameters
patterns:@Nullable String

a comma-separated list of patterns

includeMatchingClassNamesback to summary
public static Predicate<String> includeMatchingClassNames(@Nullable String patterns)

Create a Predicate that can be used to include (i.e., filter in) fully qualified class names matching any of the supplied patterns.

Parameters
patterns:@Nullable String

a comma-separated list of patterns

matchingClassesback to summary
private static <T> Predicate<T> matchingClasses(@Nullable String patterns, Function<T, String> classNameProvider, ClassNamePatternFilterUtils.FilterType type)
replaceRegExElementsback to summary
private static String replaceRegExElements(String pattern)
org.junit.platform.commons.util back to summary

private final Enum ClassNamePatternFilterUtils.FilterType

extends Enum<ClassNamePatternFilterUtils.FilterType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ClassNamePatternFilterUtils.FilterType
public static final ClassNamePatternFilterUtils.FilterType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ClassNamePatternFilterUtils.FilterType
public static ClassNamePatternFilterUtils.FilterType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EXCLUDEback to summary
public static final ClassNamePatternFilterUtils.FilterType EXCLUDE
INCLUDEback to summary
public static final ClassNamePatternFilterUtils.FilterType INCLUDE

Constructor Detail

FilterTypeback to summary
private FilterType()

Method Detail

valueOfback to summary
public static ClassNamePatternFilterUtils.FilterType valueOf(String name)
valuesback to summary
public static ClassNamePatternFilterUtils.FilterType[] values()