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:
- GroovyObject, Serializable, Cloneable, Runnable
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
- Version:
- $Revision: 18729 $
- Author:
- James Strachan
- See Also:
- Serialized Form
Methods inherited from class groovy.lang.Closure |
asWritable, call, call, call, clone, curry, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, ncurry, rcurry, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException |
IteratorClosureAdapter
public IteratorClosureAdapter(Object delegate)
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)