TestRuntimeUtil (Grails 3.2.9)
Date: 2017-04-26

Package: grails.test.runtime

## [Groovy] Class TestRuntimeUtil

- grails.test.runtime.TestRuntimeUtil

- Utility functions used in TestRuntime

  Authors:
    Lari Hotari
  Since:
    2.4.1

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<T extends Annotation>` | `static java.util.Collection<T>` | `collectAllAnnotations(java.lang.Class annotatedClazz, java.lang.Class<T> annotationType, boolean checkPackage)` Collects all annotations of given type from given class, it's package, superclasses and their packages Meta-annotations get processed too.
    `<T extends Annotation>` | `static T` | `findFirstAnnotation(java.lang.Class annotatedClazz, java.lang.Class<T> annotationType, boolean checkPackage)` Finds first annotation of given type from given class, it's package or superclasses (and their package) Meta-annotations get processed too.
    `<T extends Annotation>` | `static java.util.Collection<T>` | `getAnnotations(java.lang.reflect.AnnotatedElement ae, java.lang.Class<T> annotationType)` Collections annotations of given type of given class.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### <T extends Annotation> static java.util.Collection<T> collectAllAnnotations(java.lang.Class annotatedClazz, java.lang.Class<T> annotationType, boolean checkPackage)

      Collects all annotations of given type from given class, it's package, superclasses and their packages Meta-annotations get processed too.

      Parameters:
        annotatedClazz
        annotationType
        checkPackage
      Returns:

    - #### <T extends Annotation> static T findFirstAnnotation(java.lang.Class annotatedClazz, java.lang.Class<T> annotationType, boolean checkPackage)

      Finds first annotation of given type from given class, it's package or superclasses (and their package) Meta-annotations get processed too.

      Parameters:
        annotatedClazz
        annotationType
        checkPackage
      Returns:

    - #### <T extends Annotation> static java.util.Collection<T> getAnnotations(java.lang.reflect.AnnotatedElement ae, java.lang.Class<T> annotationType)

      Collections annotations of given type of given class. Processes meta-annotations.

      Parameters:
        `ae` - annotated element (class or package usually)
        annotationType
      Returns:
        collection of annotations