Package: grails.async

## [Groovy] Annotation Type DelegateAsync

- grails.async.DelegateAsync

- An AST transformation that takes each method in the given class and adds a delegate method that returns a Promise and executes the method asynchronously. For example given the following class:

       class BookApi {
          List listBooksByTitle(String title) { }
       }

  If the annotation is applied to a new class:

       @DelegateAsync(BookApi)
       class AsyncBookApi {}

  The resulting class is transformed into:

       class AsyncBookApi {
           private BookApi $bookApi
           Promise> listBooksByTitle(String title) {
              (Promise>)Promises.createPromise {
                  $bookApi.listBooksByTitle(title)
              }
           }
       }

  Authors:
    Graeme Rocher
  Since:
    2.3

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.lang.Class` | `value()` @default DelegateAsync

  - ### 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

    - #### java.lang.Class value()

      Default:
        DelegateAsync