public class JavaFieldPredicates extends Object
NOTE: it is recommended to use methods that accept fully qualified class names instead of
Class
objects to reduce the risks of introducing circular dependencies between the
project submodules.
Constructor and Description |
---|
JavaFieldPredicates() |
Modifier and Type | Method and Description |
---|---|
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
annotatedWith(Class<? extends Annotation> annotationType)
Match the single Annotation of the
JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
annotatedWith(String fqAnnotationTypeName)
Match the single Annotation of the
JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
isAssignableTo(Class<?> clazz)
Match the
Class of the JavaField 's assignability. |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
isFinal()
Match the final modifier of the
JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
isNotStatic()
Match none static modifier of the
JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
isPublic()
Match the public modifier of the
JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
isStatic()
Match the static modifier of the
JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
ofType(Class<?> clazz)
Match the
Class of the JavaField . |
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> |
ofType(String fqClassName)
Match the
Class of the JavaField . |
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isPublic()
JavaField
.DescribedPredicate
returning true, if and only if the tested JavaField
has the public modifier.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isStatic()
JavaField
.DescribedPredicate
returning true, if and only if the tested JavaField
has the static modifier.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isNotStatic()
JavaField
.DescribedPredicate
returning true, if and only if the tested JavaField
has no static modifier.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isFinal()
JavaField
.DescribedPredicate
returning true, if and only if the tested JavaField
has the final modifier.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> ofType(Class<?> clazz)
Class
of the JavaField
.DescribedPredicate
returning true, if the tested JavaField
has the
same type of the given clazz
.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> ofType(String fqClassName)
Class
of the JavaField
.DescribedPredicate
returning true, if and only if the tested JavaField
has the same type of the given clazz
.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isAssignableTo(Class<?> clazz)
Class
of the JavaField
's assignability.clazz
- the Class type to check for assignabilityDescribedPredicate
that returns true
, if the respective JavaField
is assignable to the supplied clazz
.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> annotatedWith(Class<? extends Annotation> annotationType)
JavaField
.DescribedPredicate
returning true, if and only if the tested JavaField
has exactly the given Annotation annotationType
.public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> annotatedWith(String fqAnnotationTypeName)
JavaField
.DescribedPredicate
returning true, if the tested JavaField
is
annotated with the annotation identified by the fully qualified name fqAnnotationTypeName
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.