net.sf.okapi.common.resource

## Interface IWithAnnotations

- All Known Subinterfaces:
    INameable, ITextUnit
  All Known Implementing Classes:
    BaseNameable, BaseReferenceable, Custom, Document, DocumentPart, Ending, EndSubfilter, MultiEvent, PipelineParameters, RawDocument, Segment, StartDocument, StartGroup, StartSubDocument, StartSubfilter, StorageList, TextContainer, TextPart, TextUnit

      public interface IWithAnnotations

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<A extends IAnnotation> A` | `getAnnotation(java.lang.Class<A> annotationType)` Gets the annotation object for a given class for this resource.
    `java.lang.Iterable<IAnnotation>` | `getAnnotations()` Gets the iterable list of the annotations for this resource.
    `void` | `setAnnotation(IAnnotation annotation)` Sets an annotation object for this resource.

- - ### Method Detail

    - #### getAnnotation

          <A extends IAnnotation> A getAnnotation(java.lang.Class<A> annotationType)

      Gets the annotation object for a given class for this resource.
      Type Parameters:
        `A` - the type of the class.
      Parameters:
        `annotationType` - the class of the annotation object to retrieve.
      Returns:
        the annotation for the given class for this resource.

    - #### setAnnotation

          void setAnnotation(IAnnotation annotation)

      Sets an annotation object for this resource.
      Parameters:
        `annotation` - the annotation object to set.

    - #### getAnnotations

          java.lang.Iterable<IAnnotation> getAnnotations()

      Gets the iterable list of the annotations for this resource.
      Returns:
        the iterable list of the annotations for this resource.