Package: groovy.lang

## Class Closure

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `Object` | `asType(Class clazz)` Coerces the closure to an implementation of the given class.
    `void` | `print(Object value)` Print a value to the standard output stream.
    `void` | `println()` Print a linebreak to the standard output stream.
    `void` | `println(Object value)` Print a value (followed by a newline) to the standard output stream.

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

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `contains`, `count`, `dump`, `each`, `eachWithIndex`, `equals`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `flatten`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `groupBy`, `groupBy`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `iterator`, `join`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `size`, `split`, `sprintf`, `sprintf`, `sum`, `sum`, `sum`, `sum`, `toArrayString`, `toSpreadMap`, `toString`, `use`, `use`, `use`, `with`, `withTraits`

- - ### Methods Detail

    - #### public Object asType(Class clazz)

      Coerces the closure to an implementation of the given class. The class is assumed to be an interface or class with a single method definition. The closure is used as the implementation of that single method.

      Parameters:
        `clazz` - the target type
      Returns:
        a Proxy of the given type which wraps this closure.
      Since:
        1.0

    - #### public void print(Object value)

      Print a value to the standard output stream. This method delegates to the owner to execute the method.

      Parameters:
        `value` - the value to print
      Since:
        1.0

    - #### public void println()

      Print a linebreak to the standard output stream. This method delegates to the owner to execute the method.

      Since:
        1.0

    - #### public void println(Object value)

      Print a value (followed by a newline) to the standard output stream. This method delegates to the owner to execute the method.

      Parameters:
        `value` - the value to print
      Since:
        1.0