Class JavaFieldPredicates
java.lang.Object
org.apache.flink.architecture.common.JavaFieldPredicates
Fine-grained predicates focus on the JavaField.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>annotatedWith(Class<? extends Annotation> annotationType) Match the single Annotation of theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>annotatedWith(String fqAnnotationTypeName) Match the single Annotation of theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>isAssignableTo(Class<?> clazz) Match theClassof theJavaField's assignability.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>isFinal()Match the final modifier of theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>Match none static modifier of theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>isPublic()Match the public modifier of theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>isStatic()Match the static modifier of theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>Match theClassof theJavaField.static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>Match theClassof theJavaField.
-
Constructor Details
-
JavaFieldPredicates
public JavaFieldPredicates()
-
-
Method Details
-
isPublic
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isPublic()Match the public modifier of theJavaField.- Returns:
- A
DescribedPredicatereturning true, if and only if the testedJavaFieldhas the public modifier.
-
isStatic
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isStatic()Match the static modifier of theJavaField.- Returns:
- A
DescribedPredicatereturning true, if and only if the testedJavaFieldhas the static modifier.
-
isNotStatic
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isNotStatic()Match none static modifier of theJavaField.- Returns:
- A
DescribedPredicatereturning true, if and only if the testedJavaFieldhas no static modifier.
-
isFinal
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isFinal()Match the final modifier of theJavaField.- Returns:
- A
DescribedPredicatereturning true, if and only if the testedJavaFieldhas the final modifier.
-
ofType
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> ofType(Class<?> clazz) Match theClassof theJavaField.- Returns:
- A
DescribedPredicatereturning true, if the testedJavaFieldhas the same type of the givenclazz.
-
ofType
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> ofType(String fqClassName) Match theClassof theJavaField.- Returns:
- A
DescribedPredicatereturning true, if and only if the testedJavaFieldhas the same type of the givenclazz.
-
isAssignableTo
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isAssignableTo(Class<?> clazz) Match theClassof theJavaField's assignability.- Parameters:
clazz- the Class type to check for assignability- Returns:
- a
DescribedPredicatethat returnstrue, if the respectiveJavaFieldis assignable to the suppliedclazz.
-
annotatedWith
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> annotatedWith(Class<? extends Annotation> annotationType) Match the single Annotation of theJavaField.- Returns:
- A
DescribedPredicatereturning true, if and only if the testedJavaFieldhas exactly the given AnnotationannotationType.
-
annotatedWith
public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> annotatedWith(String fqAnnotationTypeName) Match the single Annotation of theJavaField.- Returns:
- A
DescribedPredicatereturning true, if the testedJavaFieldis annotated with the annotation identified by the fully qualified namefqAnnotationTypeName.
-