Package org.junit.platform.commons.util
Class ClassFilter
- java.lang.Object
-
- org.junit.platform.commons.util.ClassFilter
-
@API(status=INTERNAL, since="1.1") public class ClassFilter extends Object implements Predicate<Class<?>>
Class-related predicate holder used by reflection utilities.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.1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(Class<?> type)
Test class using the stored class predicate.boolean
match(String name)
Test name using the stored name predicate.static ClassFilter
of(Predicate<Class<?>> classPredicate)
Create aClassFilter
instance that accepts all names but filters classes.static ClassFilter
of(Predicate<String> namePredicate, Predicate<Class<?>> classPredicate)
Create aClassFilter
instance that filters by names and classes.boolean
test(Class<?> type)
-
-
-
Method Detail
-
of
public static ClassFilter of(Predicate<Class<?>> classPredicate)
Create aClassFilter
instance that accepts all names but filters classes.
-
of
public static ClassFilter of(Predicate<String> namePredicate, Predicate<Class<?>> classPredicate)
Create aClassFilter
instance that filters by names and classes.
-
match
public boolean match(String name)
Test name using the stored name predicate.
-
match
public boolean match(Class<?> type)
Test class using the stored class predicate.
-
-