Class JavaFieldPredicates


  • public class JavaFieldPredicates
    extends Object
    Fine-grained predicates focus on the JavaField.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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> 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.
    • Constructor Detail

      • JavaFieldPredicates

        public JavaFieldPredicates()
    • Method Detail

      • 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 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.