Class JavaFieldPredicates

java.lang.Object
org.apache.flink.architecture.common.JavaFieldPredicates

public class JavaFieldPredicates extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    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>
    Match the Class of the JavaField's assignability.
    static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>
    Match the final modifier of the JavaField.
    static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>
    Match none static modifier of the JavaField.
    static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>
    Match the public modifier of the JavaField.
    static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField>
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the JavaField.
      Returns:
      A DescribedPredicate returning true, if and only if the tested JavaField has the public modifier.
    • isStatic

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isStatic()
      Match the static modifier of the JavaField.
      Returns:
      A DescribedPredicate returning true, if and only if the tested JavaField has the static modifier.
    • isNotStatic

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isNotStatic()
      Match none static modifier of the JavaField.
      Returns:
      A DescribedPredicate returning true, if and only if the tested JavaField has no static modifier.
    • isFinal

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isFinal()
      Match the final modifier of the JavaField.
      Returns:
      A DescribedPredicate returning true, if and only if the tested JavaField has the final modifier.
    • ofType

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> ofType(Class<?> clazz)
      Match the Class of the JavaField.
      Returns:
      A DescribedPredicate returning true, if the tested JavaField has the same type of the given clazz.
    • ofType

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> ofType(String fqClassName)
      Match the Class of the JavaField.
      Returns:
      A DescribedPredicate returning true, if and only if the tested JavaField has the same type of the given clazz.
    • isAssignableTo

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> isAssignableTo(Class<?> clazz)
      Match the Class of the JavaField's assignability.
      Parameters:
      clazz - the Class type to check for assignability
      Returns:
      a DescribedPredicate that returns true, if the respective JavaField is assignable to the supplied clazz.
    • annotatedWith

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> annotatedWith(Class<? extends Annotation> annotationType)
      Match the single Annotation of the JavaField.
      Returns:
      A DescribedPredicate returning true, if and only if the tested JavaField has exactly the given Annotation annotationType.
    • annotatedWith

      public static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaField> annotatedWith(String fqAnnotationTypeName)
      Match the single Annotation of the JavaField.
      Returns:
      A DescribedPredicate returning true, if the tested JavaField is annotated with the annotation identified by the fully qualified name fqAnnotationTypeName.