Module org.junit.platform.commons
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 TypeMethodDescriptionboolean
Test the given class using the stored class predicate.boolean
Test the given name using the stored name predicate.static ClassFilter
Create aClassFilter
instance that accepts all names but filters classes.static ClassFilter
Create aClassFilter
instance that filters by names and classes.
-
Method Details
-
of
Create aClassFilter
instance that accepts all names but filters classes.- Parameters:
classPredicate
- the class type predicate; nevernull
- Returns:
- an instance of
ClassFilter
; nevernull
-
of
Create aClassFilter
instance that filters by names and classes.- Parameters:
namePredicate
- the class name predicate; nevernull
classPredicate
- 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:
true
if 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:
true
if the input type matches the predicate, otherwisefalse
-