nl.jqno.equalsverifier.util.annotations
Interface Annotation

All Known Implementing Classes:
SupportedAnnotations

public interface Annotation

Describes an annotation that can be recognised by EqualsVerifier. The annotation can have RetentionPolicy.RUNTIME or RetentionPolicy.CLASS, and must have either ElementType.TYPE or ElementType.FIELD.

Author:
Jan Ouwens

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.
 

Method Detail

descriptors

Iterable<String> descriptors()
One or more strings that contain the annotation's class name. A descriptor can be the annotation's fully qualified canonical name, or a substring thereof. An annotation can be described by more than one descriptor. For instance, @Nonnull, @NonNull and @NotNull have the same semantics; their descriptors can be grouped together in one Annotation instance.

Returns:
An Iterable of annotation descriptor strings.

inherits

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.

Returns:
True if the annotation is inherited by subclasses of the class in which the annotation appears.

validate

boolean validate(AnnotationProperties properties)
Validates the annotation based on its properties.

Parameters:
properties - An object that contains information about the annotation.
Returns:
True if the annotation is valid and can be used as intended.


Copyright © 2015. All Rights Reserved.