org.apache.tamaya.inject.internal

## Class Utils

- java.lang.Object
- - org.apache.tamaya.inject.internal.Utils

-     public final class Utils
      extends Object

  Utility class simplifying some implementation aspects. Created by Anatole on 11.11.2014.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends Annotation> T` | `getAnnotation(Class<T> annotationType, AnnotatedElement... objects)` Utility method to read out repeatable annotations.
    `static <T extends Annotation,R extends Annotation> Collection<T>` | `getAnnotations(AccessibleObject annotated, Class<T> repeatableAnnotation, Class<R> annotationContainer)` Utility method to read out repeatable annotations.
    `static <T extends Annotation,R extends Annotation> Collection<T>` | `getAnnotations(AnnotatedElement annotated, Class<T> repeatableAnnotation, Class<R> annotationContainer)` Utility method to read out repeatable annotations.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getAnnotations

          public static <T extends Annotation,R extends Annotation> Collection<T> getAnnotations(AnnotatedElement annotated,
                                                                                                 Class<T> repeatableAnnotation,
                                                                                                 Class<R> annotationContainer)

      Utility method to read out repeatable annotations.
      Type Parameters:
        `T` - the repeatable annotation type
        `R` - the repeatable container annotation type
      Parameters:
        `annotated` - the annotated instance.
        `repeatableAnnotation` - the repeatable annotation type
        `annotationContainer` - the container annotation type
      Returns:
        a list with the annotations found (could be empty, but never null).

    - #### getAnnotations

          public static <T extends Annotation,R extends Annotation> Collection<T> getAnnotations(AccessibleObject annotated,
                                                                                                 Class<T> repeatableAnnotation,
                                                                                                 Class<R> annotationContainer)

      Utility method to read out repeatable annotations.
      Type Parameters:
        `T` - the repeatable annotation type
        `R` - the repeatable container annotation type
      Parameters:
        `annotated` - the annotated instance.
        `repeatableAnnotation` - the repeatable annotation type
        `annotationContainer` - the container annotation type
      Returns:
        a list with the annotations found (could be empty, but never null).

    - #### getAnnotation

          public static <T extends Annotation> T getAnnotation(Class<T> annotationType,
                                                               AnnotatedElement... objects)

      Utility method to read out repeatable annotations.
      Type Parameters:
        `T` - the repeatable annotation type
      Parameters:
        `annotationType` - the annotation type.
        `objects` - the accessible objects to be looked up
      Returns:
        a list with the annotations found (could be empty, but never null).

Copyright © 2014–2015 Apache Software Foundation. All rights reserved.