Top Description Fields Constructors Methods
org.codehaus.groovy.runtime

public Class IteratorClosureAdapter<T>

extends Closure
Class Inheritance
Imports
groovy.lang.Closure, .MetaClass, java.util.ArrayList, .List

A closure which stores calls in a List so that method calls can be iterated over in a 'yield' style way

Field Summary

Modifier and TypeField and Description
private final List<T>
private MetaClass
private static final long
Inherited from groovy.lang.Closure:
DELEGATE_FIRSTDELEGATE_ONLYDONEIDENTITYmaximumNumberOfParametersOWNER_FIRSTOWNER_ONLYparameterTypesSKIPTO_SELF

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<T>
protected Object
doCall(T argument)

public MetaClass
getMetaClass()

Overrides groovy.lang.GroovyObjectSupport.getMetaClass.

Implements groovy.lang.GroovyObject.getMetaClass.

Returns the metaclass for a given class.
public void
setMetaClass(MetaClass
the new metaclass
metaClass
)

Overrides groovy.lang.GroovyObjectSupport.setMetaClass.

Implements groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.
Inherited from groovy.lang.Closure:
andThenandThenSelfandThenSelfasWritablecallcallcallclonecomposecomposeSelfcomposeSelfcurrycurrydehydrategetDelegategetDirectivegetMaximumNumberOfParametersgetOwnergetParameterTypesgetPropertygetResolveStrategygetThisObjectisCaseleftShiftleftShiftmemoizememoizeAtLeastmemoizeAtMostmemoizeBetweenncurryncurryrcurryrcurryrehydraterightShiftrunsetDelegatesetDirectivesetPropertysetResolveStrategythrowRuntimeExceptiontrampolinetrampoline

Field Detail

listback to summary
private final List<T> list
metaClassback to summary
private MetaClass metaClass

Hides groovy.lang.GroovyObjectSupport.metaClass.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides groovy.lang.Closure.serialVersionUID.

Constructor Detail

IteratorClosureAdapterback to summary
public IteratorClosureAdapter(Object delegate)

Method Detail

asListback to summary
public List<T> asList()
doCallback to summary
protected Object doCall(T argument)
getMetaClassback to summary
public MetaClass getMetaClass()

Overrides groovy.lang.GroovyObjectSupport.getMetaClass.

Implements groovy.lang.GroovyObject.getMetaClass.

Doc from groovy.lang.GroovyObject.getMetaClass.

Returns the metaclass for a given class.

Returns:MetaClass

the metaClass of this instance

setMetaClassback to summary
public void setMetaClass(MetaClass metaClass)

Overrides groovy.lang.GroovyObjectSupport.setMetaClass.

Implements groovy.lang.GroovyObject.setMetaClass.

Doc from groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.

Parameters
metaClass:MetaClass

the new metaclass