public final class ClassConditions
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.function.Predicate<java.lang.Class> |
MUST_BE_CLASS
The Predicate will return true if the given class is a real class
E.g: No enums or interfaces
|
static java.util.function.Predicate<java.lang.Class> |
NEED_ABSTRACT
The Predicate will return true if the given class is abstract
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
NO_DISABLE_ANNOTATION
The Predicate will return true if the given AnnotatedElement does not have the
Disabled annotation |
static java.util.function.Predicate<java.lang.Class> |
NOT_ABSTRACT
The Predicate will return true if the given class is not abstract
|
| Constructor and Description |
|---|
ClassConditions() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.function.Predicate<java.lang.Class> |
allMethods(java.util.function.Predicate<java.lang.reflect.Method> methodCondition)
The Predicate will return true if the all method of the given class bypasses the filter
|
static java.util.function.Predicate<java.lang.Class> |
anyMethod(java.util.function.Predicate<java.lang.reflect.Method> methodCondition)
The Predicate will return true if the any method of the given class bypasses the filter
|
static java.util.function.Predicate<java.lang.Class> |
assignable(java.lang.Class<?> clazz)
The Predicate will return true if the given class is a assignable from a specific class
|
static <S> java.util.function.Predicate<S> |
assignableClass(java.lang.Class<? extends S> clazz)
The Predicate will return true if the given object is a assignable from a specific class
|
static java.util.function.Predicate<java.lang.Class> |
instanceOf(java.lang.Class clazz)
The Predicate will return true if the given class is a instance of a specific class
|
static java.util.function.Predicate<java.lang.Class> |
isInPackage(java.lang.String packageName)
The Predicate will return true if the given class is in a specific package
|
static <C extends java.lang.Class> |
mustBeClass()
The Predicate will return true if the given class is a real class
E.g: No enums or interfaces
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
needAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
The Predicate will return true if the given class has the specified annotation
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
needAnnotations(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
The Predicate will return true if the given class has all of the specified annotation
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
needAnnotations(java.util.Collection<? extends java.lang.Class<? extends java.lang.annotation.Annotation>> annotations)
The Predicate will return true if the given class has all of the specified annotation
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
needOneAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
The Predicate will return true if the given class has any of the specified annotation
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
needOneAnnotation(java.util.Collection<? extends java.lang.Class<? extends java.lang.annotation.Annotation>> annotations)
The Predicate will return true if the given class has any of the specified annotation
|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
unallowedAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
The Predicate will return true if the given class not has the specified annotation
|
public static final java.util.function.Predicate<java.lang.Class> NEED_ABSTRACT
public static final java.util.function.Predicate<java.lang.Class> NOT_ABSTRACT
public static final java.util.function.Predicate<java.lang.reflect.AnnotatedElement> NO_DISABLE_ANNOTATION
Disabled annotationpublic static final java.util.function.Predicate<java.lang.Class> MUST_BE_CLASS
public static <C extends java.lang.Class> java.util.function.Predicate<C> mustBeClass()
public static java.util.function.Predicate<java.lang.Class> isInPackage(java.lang.String packageName)
public static java.util.function.Predicate<java.lang.Class> instanceOf(java.lang.Class clazz)
public static java.util.function.Predicate<java.lang.Class> assignable(java.lang.Class<?> clazz)
public static <S> java.util.function.Predicate<S> assignableClass(java.lang.Class<? extends S> clazz)
public static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> needAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> needOneAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
public static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> needOneAnnotation(java.util.Collection<? extends java.lang.Class<? extends java.lang.annotation.Annotation>> annotations)
public static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> needAnnotations(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
public static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> needAnnotations(java.util.Collection<? extends java.lang.Class<? extends java.lang.annotation.Annotation>> annotations)
public static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> unallowedAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public static java.util.function.Predicate<java.lang.Class> anyMethod(java.util.function.Predicate<java.lang.reflect.Method> methodCondition)
methodCondition - the filter for the methodspublic static java.util.function.Predicate<java.lang.Class> allMethods(java.util.function.Predicate<java.lang.reflect.Method> methodCondition)
methodCondition - the filter for the methods