public final class ClassPredicates extends Object
Modifier and Type | Method and Description |
---|---|
static Predicate<Class<?>> |
atLeastOneConstructorIsPublic()
Checks if a candidate class has at least one public constructor.
|
static Predicate<Class<?>> |
atLeastOneInterfaceImplemented()
Checks if a candidate class implements at least one interface.
|
static Predicate<Class<?>> |
classImplements(Class<?> anInterface)
Checks if a candidate class is an interface.
|
static Predicate<Class<?>> |
classIs(Class<?> reference)
Checks if a candidate class is equal to the specified class.
|
static Predicate<Class<?>> |
classIsAnnotation()
Checks if a candidate class is an annotation.
|
static Predicate<Class<?>> |
classIsAssignableFrom(Class<?> ancestor)
Check if a candidate class is assignable to the specified class.
|
static Predicate<Class<?>> |
classIsDescendantOf(Class<?> ancestor)
Check if a candidate class is strictly a descendant of the specified class (not the
specified class itself).
|
static Predicate<Class<?>> |
classIsInterface()
Checks if a candidate class is an interface.
|
static Predicate<Class<?>> |
classModifierIs(int modifier)
Checks if a candidate class has the specified modifier.
|
static <T extends Executable> |
executableModifierIs(int modifier)
Checks if a candidate class has the specified modifier.
|
public static Predicate<Class<?>> classIs(Class<?> reference)
reference
- the class to check for.public static Predicate<Class<?>> classIsAssignableFrom(Class<?> ancestor)
ancestor
- the class to check for.public static Predicate<Class<?>> classIsDescendantOf(Class<?> ancestor)
ancestor
- the ancestor class to check for.public static Predicate<Class<?>> classImplements(Class<?> anInterface)
public static Predicate<Class<?>> classIsInterface()
public static Predicate<Class<?>> classIsAnnotation()
public static Predicate<Class<?>> classModifierIs(int modifier)
modifier
- the modifier to check for.public static <T extends Executable> Predicate<T> executableModifierIs(int modifier)
modifier
- the modifier to check for.public static Predicate<Class<?>> atLeastOneInterfaceImplemented()
Copyright © 2013-2018–2019 SeedStack. All rights reserved.