org.codehaus.groovy.runtime
Class IteratorClosureAdapter

java.lang.Object
  extended bygroovy.lang.GroovyObjectSupport
      extended bygroovy.lang.Closure
          extended byorg.codehaus.groovy.runtime.IteratorClosureAdapter
All Implemented Interfaces:
Cloneable, GroovyObject, Runnable

public class IteratorClosureAdapter
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: 1205 $
Author:
James Strachan

Field Summary
 
Fields inherited from class groovy.lang.Closure
DONE, maximumNumberOfParameters, SKIP
 
Constructor Summary
IteratorClosureAdapter(Object delegate)
           
 
Method Summary
 List asList()
           
protected  Object doCall(Object argument)
           
 MetaClass getMetaClass()
           
 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, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getThisObject, isCase, run, setDelegate, setDirective, setProperty, throwRuntimeException
 
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 Detail

IteratorClosureAdapter

public IteratorClosureAdapter(Object delegate)
Method Detail

getMetaClass

public MetaClass getMetaClass()
Specified by:
getMetaClass in interface GroovyObject
Overrides:
getMetaClass in class GroovyObjectSupport

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

asList

public List asList()

doCall

protected Object doCall(Object argument)


Copyright © 2003-2007 The Codehaus. All Rights Reserved.