Interface Annotation

    • Method Detail

      • partialClassNames

        Set<String> partialClassNames()
        One or more strings that contain the annotation's (partial) class name. This can be the annotation's fully qualified canonical name, or a substring thereof.

        An annotation can be described by more than one partial class name. For instance, @Nonnull, @NonNull and @NotNull have the same semantics; their partialClassNames can be grouped together in one Annotation instance.

        Returns:
        A Set of potentially partial annotation class names.
      • 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.

        Note: this encompasses more than Inherited does: this flag also applies, for example, to annotations on fields that are declared in a superclass.

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

        default boolean validate​(AnnotationProperties properties,
                                 AnnotationCache annotationCache,
                                 Set<String> ignoredAnnotations)
        Validates the annotation based on its properties.
        Parameters:
        properties - An object that contains information about the annotation.
        annotationCache - A cache containing all annotations for known types.
        ignoredAnnotations - A collection of type partialClassNames for annotations to ignore.
        Returns:
        True if the annotation is valid and can be used as intended.
      • postProcess

        default void postProcess​(Set<Class<?>> types,
                                 AnnotationCache annotationCache)
        Performs post processing after the annotation was added to the cache.
        Parameters:
        types - The types that the annotation applies to.
        annotationCache - A cache containing all annotations for known types.