Class CanBeAnnotated.Predicates
java.lang.Object
com.tngtech.archunit.core.domain.properties.CanBeAnnotated.Predicates
- Enclosing interface:
- CanBeAnnotated
Predefined
predicates
targeting objects that implement CanBeAnnotated
-
Method Summary
Modifier and TypeMethodDescriptionstatic DescribedPredicate<CanBeAnnotated>
annotatedWith
(DescribedPredicate<? super JavaAnnotation<?>> predicate) Returns a predicate that matches elements that are annotated with an annotation matching the given predicate.static DescribedPredicate<CanBeAnnotated>
annotatedWith
(Class<? extends Annotation> annotationType) Returns a predicate that matches elements that are annotated with the given annotation type.static DescribedPredicate<CanBeAnnotated>
annotatedWith
(String annotationTypeName) static DescribedPredicate<CanBeAnnotated>
metaAnnotatedWith
(DescribedPredicate<? super JavaAnnotation<?>> predicate) Returns a predicate that matches elements that are meta-annotated with an annotation matching the given predicate.static DescribedPredicate<CanBeAnnotated>
metaAnnotatedWith
(Class<? extends Annotation> annotationType) Returns a predicate that matches elements that are meta-annotated with the given annotation type.static DescribedPredicate<CanBeAnnotated>
metaAnnotatedWith
(String annotationTypeName)
-
Method Details
-
annotatedWith
@PublicAPI(usage=ACCESS) public static DescribedPredicate<CanBeAnnotated> annotatedWith(Class<? extends Annotation> annotationType) Returns a predicate that matches elements that are annotated with the given annotation type.- Parameters:
annotationType
- The type of the annotation to check for
-
annotatedWith
@PublicAPI(usage=ACCESS) public static DescribedPredicate<CanBeAnnotated> annotatedWith(String annotationTypeName) - Parameters:
annotationTypeName
- Fully qualified class name of a specific type ofAnnotation
- See Also:
-
annotatedWith
@PublicAPI(usage=ACCESS) public static DescribedPredicate<CanBeAnnotated> annotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) Returns a predicate that matches elements that are annotated with an annotation matching the given predicate.- Parameters:
predicate
- Qualifies matching annotations
-
metaAnnotatedWith
@PublicAPI(usage=ACCESS) public static DescribedPredicate<CanBeAnnotated> metaAnnotatedWith(Class<? extends Annotation> annotationType) Returns a predicate that matches elements that are meta-annotated with the given annotation type. A meta-annotation is an annotation that is declared on another annotation.The returned predicate also matches elements that are directly annotated with the given annotation type.
- Parameters:
annotationType
- The type of the annotation to check for
-
metaAnnotatedWith
@PublicAPI(usage=ACCESS) public static DescribedPredicate<CanBeAnnotated> metaAnnotatedWith(String annotationTypeName) - See Also:
-
metaAnnotatedWith
@PublicAPI(usage=ACCESS) public static DescribedPredicate<CanBeAnnotated> metaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) Returns a predicate that matches elements that are meta-annotated with an annotation matching the given predicate. A meta-annotation is an annotation that is declared on another annotation.The returned predicate also matches elements that are directly annotated with the given annotation type.
- Parameters:
predicate
- Qualifies matching annotations
-