public class BaseClassSpecifications extends Object
| Constructor and Description |
|---|
BaseClassSpecifications() |
| Modifier and Type | Method and Description |
|---|---|
static org.kametic.specifications.Specification<Class<?>> |
ancestorImplements(Class<?> interfaceClass) |
static org.kametic.specifications.Specification<Class<?>> |
ancestorMetaAnnotatedWith(Class<? extends Annotation> anoKlass)
Checks if the candidate or an ancestor is annotated or meta annotated by the given annotation.
|
static org.kametic.specifications.Specification<Class<?>> |
and(org.kametic.specifications.Specification<Class<?>>... participants)
Logical AND between the specifications.
|
static org.kametic.specifications.Specification<Class<?>> |
classAnnotatedWith(Class<? extends Annotation> klass) |
static org.kametic.specifications.Specification<Class<?>> |
classConstructorIsPublic() |
static org.kametic.specifications.Specification<Class<?>> |
classHasOnlyPackageViewSetters()
Checks if the candidate has only setters with the visibility package.
|
static org.kametic.specifications.Specification<Class<?>> |
classHasSetters()
Checks if the candidate has at least one setter.
|
static org.kametic.specifications.Specification<Class<?>> |
classHasSuperInterfaces()
Checks if the candidate has interface.
|
static org.kametic.specifications.Specification<Class<?>> |
classInherits(Class<?> klass)
Checks if the candidate inherits from the given class.
|
static org.kametic.specifications.Specification<Class<?>> |
classIs(Class<?> attendee) |
static org.kametic.specifications.Specification<Class<?>> |
classIsAbstract()
Checks if the class is abstract.
|
static org.kametic.specifications.Specification<Class<?>> |
classIsAnnotation()
Checks if the class is an annotation
|
static org.kametic.specifications.Specification<Class<?>> |
classIsIn(Collection<Class<?>> classes) |
static org.kametic.specifications.Specification<Class<?>> |
classIsInterface()
Checks if the candidate is an interface.
|
static org.kametic.specifications.Specification<Class<?>> |
classIsNot(Class<?> notCandidate)
Checks if the candidate equals to the given class.
|
static org.kametic.specifications.Specification<Class<?>> |
classMetaAnnotatedWith(Class<? extends Annotation> klass)
Checks if the candidate is annotated or meta annotated by the given annotation.
|
static org.kametic.specifications.Specification<Class<?>> |
classModifierIs(int modifier) |
static org.kametic.specifications.Specification<Class<?>> |
descendantOf(Class<?> ancestor) |
static org.kametic.specifications.Specification<Class<?>> |
fieldDeepAnnotatedWith(Class<? extends Annotation> annotationClass)
Checks if the candidate has one field annotated or meta annotated by the given annotation.
|
static boolean |
hasAnnotationDeep(Class<?> aClass,
Class<? extends Annotation> annotationClass)
Checks if the given class is annotated or meta annotated with the given annotation.
|
static org.kametic.specifications.Specification<Class<?>> |
methodAnnotatedWith(Class<? extends Annotation> annotationClass)
Checks if at least one method of the class is annotated with the annotation class.
|
static org.kametic.specifications.Specification<Class<?>> |
not(org.kametic.specifications.Specification<Class<?>> participant)
The negation of the given specification
|
static org.kametic.specifications.Specification<Class<?>> |
or(org.kametic.specifications.Specification<Class<?>>... participants)
Logical OR between the specifications.
|
public static org.kametic.specifications.Specification<Class<?>> classAnnotatedWith(Class<? extends Annotation> klass)
public static org.kametic.specifications.Specification<Class<?>> descendantOf(Class<?> ancestor)
public static org.kametic.specifications.Specification<Class<?>> classModifierIs(int modifier)
modifier - the expected modifierpublic static org.kametic.specifications.Specification<Class<?>> classConstructorIsPublic()
public static org.kametic.specifications.Specification<Class<?>> classIsIn(Collection<Class<?>> classes)
classes - the list of class to checkpublic static org.kametic.specifications.Specification<Class<?>> ancestorImplements(Class<?> interfaceClass)
interfaceClass - the requested interfacepublic static org.kametic.specifications.Specification<Class<?>> fieldDeepAnnotatedWith(Class<? extends Annotation> annotationClass)
annotationClass - the requested annotationpublic static org.kametic.specifications.Specification<Class<?>> classInherits(Class<?> klass)
klass - the requested classpublic static org.kametic.specifications.Specification<Class<?>> ancestorMetaAnnotatedWith(Class<? extends Annotation> anoKlass)
anoKlass - the requested annotationpublic static org.kametic.specifications.Specification<Class<?>> classMetaAnnotatedWith(Class<? extends Annotation> klass)
klass - the requested annotationpublic static org.kametic.specifications.Specification<Class<?>> classHasSetters()
public static org.kametic.specifications.Specification<Class<?>> classHasOnlyPackageViewSetters()
public static boolean hasAnnotationDeep(Class<?> aClass, Class<? extends Annotation> annotationClass)
aClass - the class to checkannotationClass - the requested annotationpublic static org.kametic.specifications.Specification<Class<?>> classIsInterface()
public static org.kametic.specifications.Specification<Class<?>> classIsNot(Class<?> notCandidate)
notCandidate - the class to checkpublic static org.kametic.specifications.Specification<Class<?>> classHasSuperInterfaces()
public static org.kametic.specifications.Specification<Class<?>> classIsAnnotation()
public static org.kametic.specifications.Specification<Class<?>> classIsAbstract()
public static org.kametic.specifications.Specification<Class<?>> methodAnnotatedWith(Class<? extends Annotation> annotationClass)
annotationClass - the requested annotationpublic static org.kametic.specifications.Specification<Class<?>> or(org.kametic.specifications.Specification<Class<?>>... participants)
participants - array of specificationpublic static org.kametic.specifications.Specification<Class<?>> and(org.kametic.specifications.Specification<Class<?>>... participants)
participants - array of specificationCopyright © 2013-2015–2015. All rights reserved.