|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<SupportedAnnotations>
nl.jqno.equalsverifier.util.annotations.SupportedAnnotations
public enum SupportedAnnotations
Descriptions of the annotations that EqualsVerifier
supports.
The actual annotations cannot be referenced here, as that would create
dependencies on the libraries that contain them, and it would preclude
people from creating and using their own annotations with the same name.
Enum Constant Summary | |
---|---|
ECLIPSE_DEFAULT_ANNOTATION_NONNULL
|
|
ENTITY
JPA Entities cannot be final, nor can their fields be. |
|
FINDBUGS1X_DEFAULT_ANNOTATION_NONNULL
If a class or package is marked with @DefaultAnnotation(Nonnull.class), EqualsVerifier will not complain about potential
NullPointerException s being thrown if any of the fields in that
class or package are null. |
|
IMMUTABLE
If a class is marked @Immutable, EqualsVerifier will not
complain about fields not being final. |
|
JSR305_DEFAULT_ANNOTATION_NONNULL
|
|
JSR305_TYPE_QUALIFIER_DEFAULT
|
|
NONNULL
If a field is marked @Nonnull (or @NonNull or @NotNull), EqualsVerifier will not complain about potential
NullPointerException s being thrown if this field is null. |
|
NULLABLE
|
|
TRANSIENT
Fields in JPA Entities that are marked @Transient should not be included in the equals/hashCode contract, like fields that have the Java transient modifier. |
Method Summary | |
---|---|
Iterable<String> |
descriptors()
One or more strings that contain the annotation's class name. |
boolean |
inherits()
Whether the annotation applies to the class in which is appears only, or whether it applies to that class and all its subclasses. |
boolean |
validate(AnnotationProperties properties)
Validates the annotation based on its properties. |
static SupportedAnnotations |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SupportedAnnotations[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SupportedAnnotations IMMUTABLE
EqualsVerifier
will not
complain about fields not being final.
public static final SupportedAnnotations NONNULL
EqualsVerifier
will not complain about potential
NullPointerException
s being thrown if this field is null.
public static final SupportedAnnotations ENTITY
EqualsVerifier
will not complain about non-final fields
on @Entity, @Embeddable and @MappedSuperclass classes.
public static final SupportedAnnotations TRANSIENT
EqualsVerifier
will treat these the same.
public static final SupportedAnnotations FINDBUGS1X_DEFAULT_ANNOTATION_NONNULL
EqualsVerifier
will not complain about potential
NullPointerException
s being thrown if any of the fields in that
class or package are null.
Note that @DefaultAnnotation is deprectated. Nevertheless, EqualsVerifier
still supports it.
public static final SupportedAnnotations JSR305_DEFAULT_ANNOTATION_NONNULL
public static final SupportedAnnotations JSR305_TYPE_QUALIFIER_DEFAULT
public static final SupportedAnnotations ECLIPSE_DEFAULT_ANNOTATION_NONNULL
public static final SupportedAnnotations NULLABLE
Method Detail |
---|
public static SupportedAnnotations[] values()
for (SupportedAnnotations c : SupportedAnnotations.values()) System.out.println(c);
public static SupportedAnnotations valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic Iterable<String> descriptors()
Annotation
Annotation
instance.
descriptors
in interface Annotation
public boolean inherits()
Annotation
inherits
in interface Annotation
public boolean validate(AnnotationProperties properties)
Annotation
validate
in interface Annotation
properties
- An object that contains information about the annotation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |