nl.jqno.equalsverifier.util.annotations
Class NonnullAnnotationChecker
java.lang.Object
nl.jqno.equalsverifier.util.annotations.NonnullAnnotationChecker
public class NonnullAnnotationChecker
- extends Object
Utility class that checks whether a field is marked with an Nonnull
annotation of some sort.
Method Summary |
static boolean |
fieldIsNonnull(ClassAccessor<?> classAccessor,
Field field)
Checks whether the given field is marked with an Nonnull annotation,
whether directly, or through some default annotation mechanism. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NonnullAnnotationChecker
public NonnullAnnotationChecker()
fieldIsNonnull
public static boolean fieldIsNonnull(ClassAccessor<?> classAccessor,
Field field)
- Checks whether the given field is marked with an Nonnull annotation,
whether directly, or through some default annotation mechanism.
- Parameters:
classAccessor
- An accessor for the class that contains the field.field
- The field to be checked.
- Returns:
- True if the field is to be treated as Nonnull.
Copyright © 2015. All Rights Reserved.