Class NonnullAnnotationVerifier

java.lang.Object
nl.jqno.equalsverifier.internal.reflection.annotations.NonnullAnnotationVerifier

public final class NonnullAnnotationVerifier extends Object
Utility class that checks whether a field is marked with an Nonnull annotation of some sort.
  • Method Details

    • fieldIsNonnull

      public static boolean fieldIsNonnull(Field field, AnnotationCache annotationCache)
      Checks whether the given field is marked with an Nonnull annotation, whether directly, or through some default annotation mechanism.
      Parameters:
      field - The field to be checked.
      annotationCache - To provide access to the annotations on the field and the field's class
      Returns:
      True if the field is to be treated as Nonnull.