Interface IWithAnnotations

    • Method Detail

      • getAnnotation

        default <A extends IAnnotation> A getAnnotation​(Class<A> annotationType)
        Gets the annotation object for a given class for this resource.
        Type Parameters:
        A -
        Parameters:
        annotation -
        Returns:
      • setAnnotation

        default void setAnnotation​(IAnnotation annotation)
        Sets an annotation object for this resource.
        Parameters:
        annotation - the annotation object to set.
      • annotationIterator

        default Iterator<IAnnotation> annotationIterator()
        Gets an iterator of the annotations for this resource.
        Returns:
        an iterator list of the annotations for this resource.
      • getAnnotationsTypesAsSet

        default Set<Class<? extends IAnnotation>> getAnnotationsTypesAsSet()
        Returns:
      • remove

        default <A extends IAnnotation> void remove​(Class<A> annotationType)
        Remove the designated IAnnotation
        Type Parameters:
        A -
        Parameters:
        annotationType - the class of the annotation object to retrieve.
      • hasAnnotations

        default boolean hasAnnotations()
        Does this resource have any annotations?
        Returns:
        true if there are annotations on this IResource
      • hasAnnotation

        default <A extends IAnnotation> boolean hasAnnotation​(Class<A> annotationType)
        Does this resource have any annotations?
        Type Parameters:
        A -
        Returns:
        true if there are annotations on this IResource