Class ClassFilter
java.lang.Object
org.junit.platform.commons.support.scanning.ClassFilter
Class-related predicate used by reflection utilities.
- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest the given class using the stored class predicate.booleanTest the given name using the stored name predicate.static ClassFilterCreate aClassFilterinstance that accepts all names but filters classes.static ClassFilterCreate aClassFilterinstance that filters by names and classes.
-
Method Details
-
of
Create aClassFilterinstance that accepts all names but filters classes.- Parameters:
classPredicate- the class type predicate; nevernull- Returns:
- an instance of
ClassFilter; nevernull
-
of
Create aClassFilterinstance that filters by names and classes.- Parameters:
namePredicate- the class name predicate; nevernullclassPredicate- the class type predicate; nevernull- Returns:
- an instance of
ClassFilter; nevernull
-
match
Test the given name using the stored name predicate.- Parameters:
name- the name to test; nevernull- Returns:
trueif the input name matches the predicate, otherwisefalse
-
match
Test the given class using the stored class predicate.- Parameters:
type- the type to test; nevernull- Returns:
trueif the input type matches the predicate, otherwisefalse
-