Package org.codehaus.groovy.runtime

# Class IteratorClosureAdapter<T>

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure
org.codehaus.groovy.runtime.IteratorClosureAdapter<T>

All Implemented Interfaces:
  `GroovyCallable`, `GroovyObject`, `Serializable`, `Cloneable`, `Runnable`, `Callable`

public class IteratorClosureAdapter<T> extends Closure
A closure which stores calls in a List so that method calls can be iterated over in a 'yield' style way

Author:
  James Strachan
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class groovy.lang.Closure

`DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF`

## Constructor Summary

Constructors
Constructor
Description
`IteratorClosureAdapter(Object delegate)`

## Method Summary

Modifier and Type
Method
Description
`List<T>`
`asList()`
`protected Object`
`doCall(T argument)`
`MetaClass`
`getMetaClass()`
Returns the metaclass for a given class.
`void`
`setMetaClass(MetaClass metaClass)`
Allows the MetaClass to be replaced with a derived implementation.

### Methods inherited from class groovy.lang.Closure

`asWritable, call, call, call, clone, curry, curry, dehydrate, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampoline`

### Methods inherited from class groovy.lang.GroovyObjectSupport

`invokeMethod`

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

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

## Constructor Details

### IteratorClosureAdapter

public IteratorClosureAdapter(Object delegate)

## Method Details

### getMetaClass

public MetaClass getMetaClass()
Description copied from interface: `GroovyObject`
Returns the metaclass for a given class.

Specified by:
  `getMetaClass` in interface `GroovyObject`
Overrides:
  `getMetaClass` in class `GroovyObjectSupport`
Returns:
  the metaClass of this instance

### setMetaClass

public void setMetaClass(MetaClass metaClass)
Description copied from interface: `GroovyObject`
Allows the MetaClass to be replaced with a derived implementation.

Specified by:
  `setMetaClass` in interface `GroovyObject`
Overrides:
  `setMetaClass` in class `GroovyObjectSupport`
Parameters:
  `metaClass` - the new metaclass

### asList

public List<T> asList()

### doCall

protected Object doCall(T argument)