|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Closure | |
---|---|
groovy.lang | Core Groovy language classes for implementing data structures, closures, metadata and so forth. |
groovy.mock | GroovyMock is a mock testing library for Groovy objects. |
groovy.model | An MVC model package for working with user interfaces and data structures and arbitrary Java and Groovy objects |
groovy.sql | Groovy helper classes for working with SQL data as Groovy objects |
groovy.swing.impl | Implementation classes for SwingBuilder |
groovy.text | Contains the text processing utilities including templating APIs and default implementations. |
groovy.ui | An interactive command line terminal along with a Swing console for evaluating Groovy scripts. |
groovy.util | Various Groovy utilities for working with nodes, builders, logging, JUnit test cases, text expressions, Ant tasks or JMX MBeans. |
groovy.util.slurpersupport | Helper classes for XmlSlurper. |
groovy.xml.streamingmarkupsupport | XmlBuilder related classes to support streaming XML. |
org.codehaus.groovy.binding | Classes related to property binding. |
org.codehaus.groovy.runtime | Runtime classes for Groovy - whether the dynamic interpreter is being used, the compiler or the bytecode generator. |
org.codehaus.groovy.runtime.metaclass | Internal classes related to Groovy's metaclass implementation. |
org.codehaus.groovy.tools.shell.util | Utility classes related to the Groovy Shell (aka. |
Uses of Closure in groovy.lang |
---|
Subclasses of Closure in groovy.lang | |
---|---|
private class |
Closure.WritableClosure
Implementation note: This has to be an inner class! Reason: Closure.this.call will call the outer call method, but with the inner class as executing object. |
Fields in groovy.lang declared as Closure | |
---|---|
private Closure |
IncorrectClosureArgumentsException.closure
|
private Closure |
ClosureException.closure
|
Methods in groovy.lang that return Closure | |
---|---|
Closure |
Closure.asWritable()
|
Closure |
Closure.WritableClosure.asWritable()
|
Closure |
Closure.curry(java.lang.Object[] arguments)
Support for closure currying |
Closure |
Closure.WritableClosure.curry(java.lang.Object[] arguments)
|
Closure |
IncorrectClosureArgumentsException.getClosure()
|
Closure |
ClosureInvokingMethod.getClosure()
Returns the original closure that this method invokes |
Closure |
ClosureException.getClosure()
|
Methods in groovy.lang with parameters of type Closure | |
---|---|
java.lang.Object |
ExpandoMetaClass.ExpandoMetaConstructor.leftShift(Closure c)
|
protected void |
ExpandoMetaClass.registerInstanceMethod(java.lang.String methodName,
Closure callable)
Registers a new instance method for the given method name and closure on this MetaClass |
protected void |
ExpandoMetaClass.registerStaticMethod(java.lang.String name,
Closure callable)
Registers a new static method for the given method name and closure on this MetaClass |
void |
Range.step(int step,
Closure closure)
Steps through the range, calling a closure for each number. |
void |
ObjectRange.step(int step,
Closure closure)
Steps through the range, calling a closure for each number. |
void |
IntRange.step(int step,
Closure closure)
Steps through the range, calling a closure for each number. |
void |
EmptyRange.step(int step,
Closure closure)
Always does nothing for an empty range. |
void |
ProxyMetaClass.use(Closure closure)
Use the ProxyMetaClass for the given Closure. |
void |
ProxyMetaClass.use(GroovyObject object,
Closure closure)
Use the ProxyMetaClass for the given Closure. |
Constructors in groovy.lang with parameters of type Closure | |
---|---|
ClosureException(Closure closure,
java.lang.Throwable cause)
|
|
IncorrectClosureArgumentsException(Closure closure,
java.lang.Object arguments,
java.lang.Class[] expected)
|
Uses of Closure in groovy.mock |
---|
Fields in groovy.mock declared as Closure | |
---|---|
private Closure |
ClosureConstraintMatcher.closure
|
Constructors in groovy.mock with parameters of type Closure | |
---|---|
ClosureConstraintMatcher(Closure closure)
|
Uses of Closure in groovy.model |
---|
Fields in groovy.model declared as Closure | |
---|---|
private Closure |
ClosureModel.readClosure
|
private Closure |
ClosureModel.writeClosure
|
Methods in groovy.model with parameters of type Closure | |
---|---|
DefaultTableColumn |
DefaultTableModel.addClosureColumn(java.lang.Object headerValue,
Closure readClosure,
Closure writeClosure,
java.lang.Class type)
Adds a closure based column to the table |
Constructors in groovy.model with parameters of type Closure | |
---|---|
ClosureModel(ValueModel sourceModel,
Closure readClosure)
|
|
ClosureModel(ValueModel sourceModel,
Closure readClosure,
Closure writeClosure)
|
|
ClosureModel(ValueModel sourceModel,
Closure readClosure,
Closure writeClosure,
java.lang.Class type)
|
Uses of Closure in groovy.sql |
---|
Fields in groovy.sql declared as Closure | |
---|---|
private Closure |
Sql.configureStatement
allows a closure to be used to configure the statement before its use |
private Closure |
DataSet.where
|
Methods in groovy.sql with parameters of type Closure | |
---|---|
void |
Sql.call(GString gstring,
Closure closure)
Performs a stored procedure call with the given parameters, calling the closure once with all result objects. |
void |
Sql.call(java.lang.String sql,
java.util.List params,
Closure closure)
Performs a stored procedure call with the given parameters. |
DataSet |
DataSet.createView(Closure criteria)
|
void |
DataSet.each(Closure closure)
|
void |
GroovyResultSetExtension.eachRow(Closure closure)
Call the closure once for each row in the result set. |
void |
GroovyResultSet.eachRow(Closure closure)
Call the closure once for each row in the result set. |
void |
Sql.eachRow(GString gstring,
Closure closure)
Performs the given SQL query calling the closure with the result set. |
void |
Sql.eachRow(java.lang.String sql,
Closure closure)
Performs the given SQL query calling the closure with each row of the result set. |
void |
Sql.eachRow(java.lang.String sql,
Closure metaClosure,
Closure rowClosure)
Performs the given SQL query calling closures for metadata and each row |
void |
Sql.eachRow(java.lang.String sql,
java.util.List params,
Closure closure)
Performs the given SQL query calling the closure with the result set. |
DataSet |
DataSet.findAll(Closure where)
|
void |
Sql.query(GString gstring,
Closure closure)
Performs the given SQL query calling the closure with the result set. |
void |
Sql.query(java.lang.String sql,
Closure closure)
Performs the given SQL query calling the closure with the result set. |
void |
Sql.query(java.lang.String sql,
java.util.List params,
Closure closure)
Performs the given SQL query with parameters calling the closure with the result set. |
void |
Sql.queryEach(GString gstring,
Closure closure)
Deprecated. please use eachRow instead |
void |
Sql.queryEach(java.lang.String sql,
Closure closure)
Deprecated. please use eachRow instead |
void |
Sql.queryEach(java.lang.String sql,
java.util.List params,
Closure closure)
Deprecated. please use eachRow instead |
java.util.List |
Sql.rows(java.lang.String sql,
Closure metaClosure)
Performs the given SQL query and return the rows of the result set. |
void |
Sql.withStatement(Closure configureStatement)
Allows a closure to be passed in to configure the JDBC statements before they are executed to do things like set the query size etc. |
Constructors in groovy.sql with parameters of type Closure | |
---|---|
DataSet(DataSet parent,
Closure where)
|
Uses of Closure in groovy.swing.impl |
---|
Fields in groovy.swing.impl declared as Closure | |
---|---|
private Closure |
DefaultAction.closure
|
Methods in groovy.swing.impl that return Closure | |
---|---|
Closure |
DefaultAction.getClosure()
|
Methods in groovy.swing.impl with parameters of type Closure | |
---|---|
void |
DefaultAction.setClosure(Closure closure)
|
Uses of Closure in groovy.text |
---|
Fields in groovy.text declared as Closure | |
---|---|
(package private) Closure |
GStringTemplateEngine.GStringTemplate.template
|
Uses of Closure in groovy.ui |
---|
Fields in groovy.ui declared as Closure | |
---|---|
private Closure |
InteractiveShell.afterExecution
|
private Closure |
InteractiveShell.beforeExecution
|
private Closure |
SystemOutputInterceptor.callback
|
Methods in groovy.ui with parameters of type Closure | |
---|---|
void |
InteractiveShell.setAfterExecution(Closure afterExecution)
A closure that is executed after the execution of the last script. |
void |
InteractiveShell.setBeforeExecution(Closure beforeExecution)
A closure that is executed before the exection of a given script |
Constructors in groovy.ui with parameters of type Closure | |
---|---|
SystemOutputInterceptor(Closure callback)
Constructor |
Uses of Closure in groovy.util |
---|
Fields in groovy.util declared as Closure | |
---|---|
(package private) Closure |
ClosureComparator.closure
|
private Closure |
FactoryBuilderSupport.nameMappingClosure
|
private Closure |
BuilderSupport.nameMappingClosure
|
private Closure |
ObservableMap.test
|
Methods in groovy.util that return Closure | |
---|---|
Closure |
FactoryBuilderSupport.addAttributeDelegate(Closure attrDelegate)
Add an attribute delegate so it can intercept attributes being set. |
Closure |
FactoryBuilderSupport.addPostInstantiateDelegate(Closure delegate)
Add a postInstantiate delegate so it can intercept nodes after they are created. |
Closure |
FactoryBuilderSupport.addPostNodeCompletionDelegate(Closure delegate)
Add a nodeCompletion delegate so it can intercept nodes after they done with building. |
Closure |
FactoryBuilderSupport.addPreInstantiateDelegate(Closure delegate)
Add a preInstantiate delegate so it can intercept nodes before they are created. |
Methods in groovy.util with parameters of type Closure | |
---|---|
void |
OrderBy.add(Closure closure)
|
Closure |
FactoryBuilderSupport.addAttributeDelegate(Closure attrDelegate)
Add an attribute delegate so it can intercept attributes being set. |
void |
FactoryBuilderSupport.addDisposalClosure(Closure closure)
|
Closure |
FactoryBuilderSupport.addPostInstantiateDelegate(Closure delegate)
Add a postInstantiate delegate so it can intercept nodes after they are created. |
Closure |
FactoryBuilderSupport.addPostNodeCompletionDelegate(Closure delegate)
Add a nodeCompletion delegate so it can intercept nodes after they done with building. |
Closure |
FactoryBuilderSupport.addPreInstantiateDelegate(Closure delegate)
Add a preInstantiate delegate so it can intercept nodes before they are created. |
void |
FactoryBuilderSupport.removeAttributeDelegate(Closure attrDelegate)
Remove the most recently added instance of the attribute delegate. |
void |
FactoryBuilderSupport.removePostInstantiateDelegate(Closure delegate)
Remove the most recently added instance of the postInstantiate delegate. |
void |
FactoryBuilderSupport.removePostNodeCompletionDelegate(Closure delegate)
Remove the most recently added instance of the nodeCompletion delegate. |
void |
FactoryBuilderSupport.removePreInstantiateDelegate(Closure delegate)
Remove the most recently added instance of the preInstantiate delegate. |
protected void |
FactoryBuilderSupport.setClosureDelegate(Closure closure,
java.lang.Object node)
A strategy method to allow derived builders to use builder-trees and switch in different kinds of builders. |
protected void |
BuilderSupport.setClosureDelegate(Closure closure,
java.lang.Object node)
A strategy method to allow derived builders to use builder-trees and switch in different kinds of builders. |
protected java.lang.String |
GroovyTestCase.shouldFail(java.lang.Class clazz,
Closure code)
Asserts that the given code closure fails when it is evaluated and that a particular exception is thrown. |
protected java.lang.String |
GroovyTestCase.shouldFail(Closure code)
Asserts that the given code closure fails when it is evaluated |
protected java.lang.String |
GroovyTestCase.shouldFailWithCause(java.lang.Class clazz,
Closure code)
|
java.lang.Object |
FactoryBuilderSupport.withBuilder(FactoryBuilderSupport builder,
Closure closure)
Switches the builder's proxyBuilder during the execution of a closure. This is useful to temporary change the building context to another builder without the need for a contrived setup. |
java.lang.Object |
FactoryBuilderSupport.withBuilder(FactoryBuilderSupport builder,
java.lang.String name,
Closure closure)
Switches the builder's proxyBuilder during the execution of a closure. This is useful to temporary change the building context to another builder without the need for a contrived setup. |
java.lang.Object |
FactoryBuilderSupport.withBuilder(java.util.Map attributes,
FactoryBuilderSupport builder,
java.lang.String name,
Closure closure)
Switches the builder's proxyBuilder during the execution of a closure. This is useful to temporary change the building context to another builder without the need for a contrived setup. |
Constructors in groovy.util with parameters of type Closure | |
---|---|
BuilderSupport(Closure nameMappingClosure,
BuilderSupport proxyBuilder)
|
|
ClosureComparator(Closure closure)
|
|
FactoryBuilderSupport(Closure nameMappingClosure)
|
|
ObservableMap(Closure test)
|
|
ObservableMap(java.util.Map delegate,
Closure test)
|
|
OrderBy(Closure closure)
|
Uses of Closure in groovy.util.slurpersupport |
---|
Fields in groovy.util.slurpersupport declared as Closure | |
---|---|
private Closure |
FilteredNodeChildren.closure
|
private Closure |
FilteredAttributes.closure
|
Methods in groovy.util.slurpersupport that return Closure | |
---|---|
Closure |
GPathResult.getBody()
|
Methods in groovy.util.slurpersupport with parameters of type Closure | |
---|---|
GPathResult |
NodeChildren.find(Closure closure)
|
GPathResult |
NodeChild.find(Closure closure)
|
GPathResult |
NoChildren.find(Closure closure)
|
abstract GPathResult |
GPathResult.find(Closure closure)
|
GPathResult |
Attribute.find(Closure closure)
|
GPathResult |
NodeChildren.findAll(Closure closure)
|
GPathResult |
NodeChild.findAll(Closure closure)
|
GPathResult |
NoChildren.findAll(Closure closure)
|
abstract GPathResult |
GPathResult.findAll(Closure closure)
|
GPathResult |
Attributes.findAll(Closure closure)
|
GPathResult |
Attribute.findAll(Closure closure)
|
protected void |
NodeChildren.replaceNode(Closure newValue)
|
protected void |
NodeChild.replaceNode(Closure newValue)
|
protected void |
NoChildren.replaceNode(Closure newValue)
|
protected abstract void |
GPathResult.replaceNode(Closure newValue)
|
protected void |
Attribute.replaceNode(Closure newValue)
|
void |
Node.replaceNode(Closure replacementClosure,
GPathResult result)
|
Constructors in groovy.util.slurpersupport with parameters of type Closure | |
---|---|
FilteredAttributes(GPathResult parent,
Closure closure,
java.util.Map namespaceTagHints)
|
|
FilteredNodeChildren(GPathResult parent,
Closure closure,
java.util.Map namespaceTagHints)
|
Uses of Closure in groovy.xml.streamingmarkupsupport |
---|
Fields in groovy.xml.streamingmarkupsupport declared as Closure | |
---|---|
protected Closure |
Builder.Built.root
|
Methods in groovy.xml.streamingmarkupsupport with parameters of type Closure | |
---|---|
abstract java.lang.Object |
Builder.bind(Closure root)
|
java.lang.Object |
BaseMarkupBuilder.bind(Closure root)
|
private static java.util.Map |
Builder.fettleMethodMap(Closure defaultGenerator,
java.util.Map methodMap)
|
Constructors in groovy.xml.streamingmarkupsupport with parameters of type Closure | |
---|---|
BaseMarkupBuilder.Document(Closure root,
java.util.Map namespaceMethodMap)
|
|
Builder.Built(Closure root,
java.util.Map namespaceTagMap)
|
Uses of Closure in org.codehaus.groovy.binding |
---|
Fields in org.codehaus.groovy.binding declared as Closure | |
---|---|
(package private) Closure |
ClosureSourceBinding.closure
|
protected Closure |
AbstractFullBinding.converter
|
(package private) Closure |
EventTriggerBinding.EventTriggerFullBinding.handler
|
protected Closure |
AbstractFullBinding.reverseConverter
|
protected Closure |
AbstractFullBinding.validator
|
Methods in org.codehaus.groovy.binding that return Closure | |
---|---|
Closure |
ClosureSourceBinding.getClosure()
|
Closure |
FullBinding.getConverter()
|
Closure |
AbstractFullBinding.getConverter()
|
Closure |
FullBinding.getReverseConverter()
|
Closure |
AbstractFullBinding.getReverseConverter()
|
Closure |
FullBinding.getValidator()
|
Closure |
AbstractFullBinding.getValidator()
|
Methods in org.codehaus.groovy.binding with parameters of type Closure | |
---|---|
void |
ClosureSourceBinding.setClosure(Closure closure)
|
void |
FullBinding.setConverter(Closure converter)
|
void |
AbstractFullBinding.setConverter(Closure converter)
|
void |
FullBinding.setReverseConverter(Closure reverseConverter)
|
void |
AbstractFullBinding.setReverseConverter(Closure reverseConverter)
|
void |
FullBinding.setValidator(Closure validator)
|
void |
AbstractFullBinding.setValidator(Closure validator)
|
Constructors in org.codehaus.groovy.binding with parameters of type Closure | |
---|---|
ClosureSourceBinding(Closure closure)
|
|
ClosureSourceBinding(Closure closure,
java.lang.Object[] arguments)
|
Uses of Closure in org.codehaus.groovy.runtime |
---|
Subclasses of Closure in org.codehaus.groovy.runtime | |
---|---|
class |
CurriedClosure
Represents wrapper around a Closure to support currying |
class |
IteratorClosureAdapter
A closure which stores calls in a List so that method calls can be iterated over in a 'yield' style way |
class |
MethodClosure
Represents a method on an object using a closure which can be invoked at any time |
Methods in org.codehaus.groovy.runtime that return Closure | |
---|---|
static Closure |
ScriptBytecodeAdapter.getMethodPointer(java.lang.Object object,
java.lang.String methodName)
Returns the method pointer for the given object name |
static Closure |
MetaClassHelper.getMethodPointer(java.lang.Object object,
java.lang.String methodName)
Returns a callable object for the given method name on the object. |
static Closure |
InvokerHelper.getMethodPointer(java.lang.Object object,
java.lang.String methodName)
Returns the method pointer for the given object name |
Closure |
Invoker.getMethodPointer(java.lang.Object object,
java.lang.String methodName)
Deprecated. |
Methods in org.codehaus.groovy.runtime with parameters of type Closure | |
---|---|
static java.net.Socket |
DefaultGroovyMethods.accept(java.net.ServerSocket serverSocket,
Closure closure)
Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread. |
void |
ClassExtender.addMethod(java.lang.String name,
Closure closure)
|
static void |
DefaultGroovyMethods.addShutdownHook(java.lang.Object self,
Closure closure)
Allows the usage of addShutdownHook without getting the runtime first. |
static boolean |
DefaultGroovyMethods.any(java.util.Map self,
Closure closure)
Iterates over the entries of a map, and checks whether a predicate is valid for at least one entry |
static boolean |
DefaultGroovyMethods.any(java.lang.Object self,
Closure closure)
Iterates over the contents of an object or collection, and checks whether a predicate is valid for at least one element. |
static java.lang.Object |
DefaultGroovyMethods.asType(Closure cl,
java.lang.Class clazz)
Coerces the closure to an implementation of the given class. |
protected static java.lang.Object |
DefaultGroovyMethods.callClosureForMapEntry(Closure closure,
java.util.Map.Entry entry)
|
protected static java.lang.Object |
DefaultGroovyMethods.callClosureForMapEntryAndCounter(Closure closure,
java.util.Map.Entry entry,
int counter)
|
static java.util.List |
DefaultGroovyMethods.collect(java.util.Collection self,
Closure closure)
Iterates through this collection transforming each entry into a new value using the closure as a transformer, returning a list of transformed values. |
static java.util.Collection |
DefaultGroovyMethods.collect(java.util.Collection self,
java.util.Collection collection,
Closure closure)
Iterates through this collection transforming each entry into a new value using the closure as a transformer, returning a list of transformed values. |
static java.util.List |
DefaultGroovyMethods.collect(java.util.Map self,
Closure closure)
Iterates through this Map transforming each entry into a new value using the closure as a transformer, returning a list of transformed values. |
static java.util.Collection |
DefaultGroovyMethods.collect(java.util.Map self,
java.util.Collection collection,
Closure closure)
Iterates through this Map transforming each entry into a new value using the closure as a transformer, returning a list of transformed values. |
static java.util.List |
DefaultGroovyMethods.collect(java.lang.Object self,
Closure closure)
Iterates through this object transforming each item into a new value using the closure as a transformer, returning a list of transformed values. |
static java.util.Collection |
DefaultGroovyMethods.collect(java.lang.Object self,
java.util.Collection collection,
Closure closure)
Iterates through this object transforming each object into a new value using the closure as a transformer and adding it to the collection, returning the resulting collection. |
static java.util.Collection |
DefaultGroovyMethods.collectAll(java.util.Collection self,
Closure closure)
Recursively iterates through this collection transforming each non-Collection entry into a new value using the closure as a transformer. |
static java.util.Collection |
DefaultGroovyMethods.collectAll(java.util.Collection self,
java.util.Collection collection,
Closure closure)
Recursively iterates through this collection transforming each non-Collection entry into a new value using the closure as a transformer. |
static void |
DefaultGroovyMethods.downto(java.math.BigDecimal self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(java.math.BigInteger self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(double self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(java.lang.Double self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(float self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(java.lang.Float self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(long self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(java.lang.Long self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
static void |
DefaultGroovyMethods.downto(java.lang.Number self,
java.lang.Number to,
Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
private static java.util.Iterator |
DefaultGroovyMethods.each(java.util.Iterator iter,
Closure closure)
|
static java.util.Map |
DefaultGroovyMethods.each(java.util.Map self,
Closure closure)
Allows a Map to be iterated through using a closure. |
static java.util.regex.Matcher |
DefaultGroovyMethods.each(java.util.regex.Matcher self,
Closure closure)
Process each matched substring of the given group matcher. |
static java.lang.Object |
DefaultGroovyMethods.each(java.lang.Object self,
Closure closure)
Iterates through an aggregate type or data structure, passing each item to the given closure. |
static void |
DefaultGroovyMethods.eachByte(java.io.File self,
Closure closure)
Traverse through each byte of this File |
static void |
DefaultGroovyMethods.eachByte(java.io.InputStream is,
Closure closure)
Traverse through each byte of the specified stream. |
static void |
DefaultGroovyMethods.eachByte(java.net.URL url,
Closure closure)
Reads the InputStream from this URL, passing each byte to the given closure. |
static void |
DefaultGroovyMethods.eachDir(java.io.File self,
Closure closure)
Invokes the closure for each directory in this directory, ignoring regular files. |
static void |
DefaultGroovyMethods.eachDirMatch(java.io.File self,
java.lang.Object filter,
Closure closure)
Invokes the closure for each directory matching the given filter in the given directory - calling the isCase() method used by switch statements. |
static void |
DefaultGroovyMethods.eachDirRecurse(java.io.File self,
Closure closure)
Invokes the closure for each descendant directory of this directory. |
static void |
DefaultGroovyMethods.eachFile(java.io.File self,
Closure closure)
Invokes the closure for each file in the given directory |
private static void |
DefaultGroovyMethods.eachFile(java.io.File self,
Closure closure,
boolean onlyDir)
Common code for DefaultGroovyMethods.eachFile(File,Closure) and DefaultGroovyMethods.eachDir(File,Closure) |
static void |
DefaultGroovyMethods.eachFileMatch(java.io.File self,
java.lang.Object filter,
Closure closure)
Invokes the closure for each file matching the given filter in the given directory - calling the isCase() method used by switch statements. |
private static void |
DefaultGroovyMethods.eachFileMatch(java.io.File self,
java.lang.Object filter,
Closure closure,
boolean onlyDir)
Common code for DefaultGroovyMethods.eachFileMatch(File,Object,Closure) and DefaultGroovyMethods.eachDirMatch(File,Object,Closure) |
static void |
DefaultGroovyMethods.eachFileRecurse(java.io.File self,
Closure closure)
Invokes the closure for each descendant file in this directory. |
private static void |
DefaultGroovyMethods.eachFileRecurse(java.io.File self,
Closure closure,
boolean onlyDir)
Common code for DefaultGroovyMethods.eachFileRecurse(File,Closure) and DefaultGroovyMethods.eachDirRecurse(File,Closure) |
static void |
DefaultGroovyMethods.eachLine(java.io.File self,
Closure closure)
Iterates through this file line by line. |
static void |
DefaultGroovyMethods.eachLine(java.io.InputStream stream,
Closure closure)
Iterates through this stream, passing each line to the closure. |
static void |
DefaultGroovyMethods.eachLine(java.io.Reader self,
Closure closure)
Iterates through the given reader line by line. |
static void |
DefaultGroovyMethods.eachLine(java.net.URL url,
Closure closure)
Iterates through the lines read from the URL's associated input stream |
static void |
DefaultGroovyMethods.eachMatch(java.lang.String self,
java.lang.String regex,
Closure closure)
Process each regex group matched substring of the given string. |
static void |
DefaultGroovyMethods.eachObject(java.io.File self,
Closure closure)
Iterates through the given file object by object. |
static void |
DefaultGroovyMethods.eachObject(java.io.ObjectInputStream ois,
Closure closure)
Iterates through the given object stream object by object. |
static java.lang.Object |
DefaultGroovyMethods.eachWithIndex(java.util.Map self,
Closure closure)
Allows a Map to be iterated through using a closure. |
static java.lang.Object |
DefaultGroovyMethods.eachWithIndex(java.lang.Object self,
Closure closure)
Iterates through an aggregate type or data structure, passing each item and the item's index (a counter starting at zero) to the given closure. |
static boolean |
DefaultGroovyMethods.every(java.util.Map self,
Closure closure)
Iterates over the entries of a map, and checks whether a predicate is valid for all entries. |
static boolean |
DefaultGroovyMethods.every(java.lang.Object self,
Closure closure)
Used to determine if the given predicate closure is valid (i.e.&nsbp;returns true for all items in this data structure). |
static Writable |
DefaultGroovyMethods.filterLine(java.io.File self,
Closure closure)
Filters the lines of a File and creates a Writeable in return to stream the filtered lines. |
static void |
DefaultGroovyMethods.filterLine(java.io.File self,
java.io.Writer writer,
Closure closure)
Filter the lines from this File, and write them to the given writer based on the given closure predicate. |
static Writable |
DefaultGroovyMethods.filterLine(java.io.InputStream self,
Closure predicate)
Filter lines from an input stream using a closure predicate. |
static void |
DefaultGroovyMethods.filterLine(java.io.InputStream self,
java.io.Writer writer,
Closure predicate)
Uses a closure to filter lines from this InputStream and pass them to the given writer. |
static Writable |
DefaultGroovyMethods.filterLine(java.io.Reader reader,
Closure closure)
Filter the lines from this Reader, and return a Writable which can be used to stream the filtered lines to a destination. |
static void |
DefaultGroovyMethods.filterLine(java.io.Reader reader,
java.io.Writer writer,
Closure closure)
Filter the lines from a reader and write them on the writer, according to a closure which returns true if the line should be included. |
static java.lang.Object |
DefaultGroovyMethods.find(java.util.Collection self,
Closure closure)
Finds the first value matching the closure condition. |
static java.lang.Object |
DefaultGroovyMethods.find(java.util.Map self,
Closure closure)
Finds the first entry matching the closure condition. |
static java.lang.Object |
DefaultGroovyMethods.find(java.lang.Object self,
Closure closure)
Finds the first value matching the closure condition |
static java.util.List |
DefaultGroovyMethods.findAll(java.util.Collection self,
Closure closure)
Finds all values matching the closure condition. |
static java.util.Map |
DefaultGroovyMethods.findAll(java.util.Map self,
Closure closure)
Finds all entries matching the closure condition. |
static java.util.List |
DefaultGroovyMethods.findAll(java.lang.Object self,
Closure closure)
Finds all items matching the closure condition. |
static int |
DefaultGroovyMethods.findIndexOf(java.lang.Object self,
Closure closure)
Iterates over the elements of an iterable collection of items and returns the index of the first item that matches the condition specified in the closure. |
static int |
DefaultGroovyMethods.findIndexOf(java.lang.Object self,
int startIndex,
Closure closure)
Iterates over the elements of an iterable collection of items, starting from a specified startIndex, and returns the index of the first item that matches the condition specified in the closure. |
static java.util.List |
DefaultGroovyMethods.findIndexValues(java.lang.Object self,
Closure closure)
Iterates over the elements of an iterable collection of items and returns the index values of the items that match the condition specified in the closure. |
static java.util.List |
DefaultGroovyMethods.findIndexValues(java.lang.Object self,
int startIndex,
Closure closure)
Iterates over the elements of an iterable collection of items, starting from a specified startIndex, and returns the index values of the items that match the condition specified in the closure. |
static int |
DefaultGroovyMethods.findLastIndexOf(java.lang.Object self,
Closure closure)
Iterates over the elements of an iterable collection of items and returns the index of the last item that matches the condition specified in the closure. |
static int |
DefaultGroovyMethods.findLastIndexOf(java.lang.Object self,
int startIndex,
Closure closure)
Iterates over the elements of an iterable collection of items, starting from a specified startIndex, and returns the index of the last item that matches the condition specified in the closure. |
private static java.lang.Object |
DefaultGroovyMethods.getClosureOwner(Closure cls)
|
static java.util.Map |
DefaultGroovyMethods.groupBy(java.util.Collection self,
Closure closure)
Sorts all collection members into groups determined by the supplied mapping closure. |
static java.util.Map |
DefaultGroovyMethods.groupBy(java.util.Map self,
Closure closure)
Groups the members of a map into sub maps determined by the supplied mapping closure. |
static java.util.Map |
DefaultGroovyMethods.groupEntriesBy(java.util.Map self,
Closure closure)
Groups all map entries into groups determined by the supplied mapping closure. |
static java.lang.Object |
DefaultGroovyMethods.identity(java.lang.Object self,
Closure closure)
Allows the closure to be called for the object reference self synonym for 'with()'. |
static java.lang.Object |
DefaultGroovyMethods.inject(java.util.Collection self,
java.lang.Object value,
Closure closure)
Iterates through the given collection, passing in the initial value to the closure along with the current iterated item then passing into the next iteration the value of the previous closure. |
static java.lang.Object |
DefaultGroovyMethods.inject(java.util.Iterator self,
java.lang.Object value,
Closure closure)
Iterates through the given iterator, passing in the initial value to the closure along with the current iterated item then passing into the next iteration the value of the previous closure. |
static java.lang.Object |
DefaultGroovyMethods.inject(java.lang.Object[] self,
java.lang.Object initialValue,
Closure closure)
Iterates through the given array of objects, passing in the initial value to the closure along with the current iterated item then passing into the next iteration the value of the previous closure. |
static java.lang.Object |
DefaultGroovyMethods.inject(java.lang.Object self,
java.lang.Object value,
Closure closure)
Iterates through the given object, passing in the initial value to the closure along with the current iterated item then passing into the next iteration the value of the previous closure. |
static java.lang.Object |
DefaultGroovyMethods.max(java.util.Collection self,
Closure closure)
Selects the maximum value found in the collection using the given closure as a comparator. |
static java.lang.Object |
DefaultGroovyMethods.min(java.util.Collection self,
Closure closure)
Selects the minimum value found in the collection using the given closure as a comparator. |
static void |
DefaultGroovyMethods.print(Closure self,
java.lang.Object value)
Print a value to the standard output stream. |
static void |
DefaultGroovyMethods.println(Closure self)
Print a linebreak to the standard output stream. |
static void |
DefaultGroovyMethods.println(Closure self,
java.lang.Object value)
Print a value (followed by a newline) to the standard output stream. |
static java.lang.String |
DefaultGroovyMethods.replaceAll(java.lang.String self,
java.lang.String regex,
Closure closure)
Replaces all occurrencies of a captured group by the result of a closure on that text. |
static java.util.List |
DefaultGroovyMethods.reverseEach(java.util.List self,
Closure closure)
Iterate over each element of the list in the reverse order. |
static java.lang.Object[] |
DefaultGroovyMethods.reverseEach(java.lang.Object[] self,
Closure closure)
|
static java.util.TimerTask |
DefaultGroovyMethods.runAfter(java.util.Timer timer,
int delay,
Closure closure)
Allows a simple syntax for using timers. |
static void |
DefaultGroovyStaticMethods.sleep(java.lang.Object object,
long milliseconds,
Closure onInterrupt)
Sleep for so many milliseconds |
protected static void |
DefaultGroovyStaticMethods.sleepImpl(java.lang.Object object,
long millis,
Closure closure)
This method is used by both sleep() methods to imlement sleeping for the given time even if interrupted |
static java.util.List |
DefaultGroovyMethods.sort(java.util.Collection self,
Closure closure)
Sorts this Collection using the given closure as a comparator. |
static void |
DefaultGroovyMethods.splitEachLine(java.io.File self,
java.lang.String sep,
Closure closure)
Iterates through this file line by line, splitting on the seperator. |
static void |
DefaultGroovyMethods.splitEachLine(java.io.Reader self,
java.lang.String sep,
Closure closure)
Iterates through the given reader line by line, splitting each line using the given separator. |
static java.lang.Thread |
DefaultGroovyStaticMethods.start(java.lang.Thread self,
Closure closure)
Start a Thread with the given closure as a Runnable instance. |
static java.lang.Thread |
DefaultGroovyStaticMethods.startDaemon(java.lang.Thread self,
Closure closure)
Start a daemon Thread with the given closure as a Runnable instance. |
static void |
DefaultGroovyMethods.step(java.lang.Number self,
java.lang.Number to,
java.lang.Number stepNumber,
Closure closure)
Iterates from this number up to the given number using a step increment. |
static java.lang.Object |
DefaultGroovyMethods.sum(java.util.Collection self,
Closure closure)
Sums the result of apply a closure to each item of a collection. |
static java.lang.Object |
DefaultGroovyMethods.sum(java.util.Collection self,
java.lang.Object initialValue,
Closure closure)
Sums the result of apply a closure to each item of a collection to sum intial value. |
private static java.lang.Object |
DefaultGroovyMethods.sum(java.util.Collection self,
java.lang.Object initialValue,
Closure closure,
boolean first)
|
static void |
DefaultGroovyMethods.times(java.lang.Number self,
Closure closure)
Executes the closure this many times, starting from zero. |
static void |
DefaultGroovyMethods.transformChar(java.io.Reader self,
java.io.Writer writer,
Closure closure)
Transforms each character from this reader by passing it to the given closure. |
static void |
DefaultGroovyMethods.transformLine(java.io.Reader reader,
java.io.Writer writer,
Closure closure)
Transforms the lines from a reader with a Closure and write them to a writer. |
static java.util.Collection |
DefaultGroovyMethods.unique(java.util.Collection self,
Closure closure)
A convenience method for making a collection unique using a closure as a comparator. |
static void |
DefaultGroovyMethods.upto(java.math.BigDecimal self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(java.math.BigInteger self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(double self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(java.lang.Double self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(float self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(java.lang.Float self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(long self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(java.lang.Long self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static void |
DefaultGroovyMethods.upto(java.lang.Number self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time. |
static java.lang.Object |
GroovyCategorySupport.use(java.lang.Class categoryClass,
Closure closure)
Create a scope based on given categoryClass and invoke closure within that scope. |
static java.lang.Object |
GroovyCategorySupport.use(java.util.List categoryClasses,
Closure closure)
Create a scope based on given categoryClasses and invoke closure within that scope. |
static java.lang.Object |
DefaultGroovyMethods.use(java.lang.Object self,
java.lang.Class categoryClass,
Closure closure)
Scoped use method |
static java.lang.Object |
DefaultGroovyMethods.use(java.lang.Object self,
java.util.List categoryClassList,
Closure closure)
Scoped use method with list of categories. |
static java.lang.Object |
DefaultGroovyMethods.with(java.lang.Object self,
Closure closure)
Allows the closure to be called for the object reference self |
static java.lang.Object |
DefaultGroovyMethods.withDataInputStream(java.io.File file,
Closure closure)
Create a new DataInputStream for this file and passes it into the closure. |
static java.lang.Object |
DefaultGroovyMethods.withDataOutputStream(java.io.File file,
Closure closure)
Create a new DataOutputStream for this file and passes it into the closure. |
static java.lang.Object |
DefaultGroovyMethods.withInputStream(java.io.File file,
Closure closure)
Create a new InputStream for this file and passes it into the closure. |
static java.lang.Object |
DefaultGroovyMethods.withInputStream(java.net.URL url,
Closure closure)
Creates a new InputStream for this URL and passes it into the closure. |
static java.lang.Object |
DefaultGroovyMethods.withObjectInputStream(java.io.File file,
Closure closure)
Create a new ObjectInputStream for this file and pass it to the closure. |
static java.lang.Object |
DefaultGroovyMethods.withObjectOutputStream(java.io.File file,
Closure closure)
Create a new ObjectOutputStream for this file and then pass it to the closure. |
static java.lang.Object |
DefaultGroovyMethods.withObjectStreams(java.net.Socket socket,
Closure closure)
Creates an InputObjectStream and an OutputObjectStream from a Socket, and passes them to the closure. |
static java.lang.Object |
DefaultGroovyMethods.withOutputStream(java.io.File file,
Closure closure)
Creates a new OutputStream for this file and passes it into the closure. |
static void |
DefaultGroovyMethods.withOutputStream(java.lang.Process self,
Closure closure)
Creates a new buffered OutputStream as stdin for this process, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. |
static java.lang.Object |
DefaultGroovyMethods.withPrintWriter(java.io.File file,
Closure closure)
Create a new PrintWriter for this file which is then passed it into the given closure. |
static java.lang.Object |
DefaultGroovyMethods.withPrintWriter(java.io.File file,
java.lang.String charset,
Closure closure)
Create a new PrintWriter with a specified charset for this file. |
static java.lang.Object |
DefaultGroovyMethods.withReader(java.io.File file,
Closure closure)
Create a new BufferedReader for this file and then passes it into the closure, ensuring the reader is closed after the closure returns. |
static java.lang.Object |
DefaultGroovyMethods.withReader(java.io.InputStream in,
Closure closure)
Helper method to create a new BufferedReader for a stream and then passes it into the closure. |
static java.lang.Object |
DefaultGroovyMethods.withReader(java.io.Reader reader,
Closure closure)
Allows this reader to be used within the closure, ensuring that it is closed before this method returns. |
static java.lang.Object |
DefaultGroovyMethods.withReader(java.net.URL url,
Closure closure)
Helper method to create a new BufferedReader for a URL and then passes it to the closure. |
static java.lang.Object |
DefaultGroovyMethods.withStream(java.io.InputStream stream,
Closure closure)
Allows this input stream to be used within the closure, ensuring that it is flushed and closed before this method returns. |
static java.lang.Object |
DefaultGroovyMethods.withStream(java.io.OutputStream os,
Closure closure)
Passes this OutputStream to the closure, ensuring that the stream is closed after the closure returns, regardless of errors. |
static java.lang.Object |
DefaultGroovyMethods.withStreams(java.net.Socket socket,
Closure closure)
Passes the Socket's InputStream and OutputStream to the closure. |
static java.lang.Object |
DefaultGroovyMethods.withWriter(java.io.File file,
Closure closure)
Creates a new BufferedWriter for this file, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. |
static java.lang.Object |
DefaultGroovyMethods.withWriter(java.io.File file,
java.lang.String charset,
Closure closure)
Creates a new BufferedWriter for this file, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. |
static java.lang.Object |
DefaultGroovyMethods.withWriter(java.io.OutputStream stream,
Closure closure)
Creates a writer from this stream, passing it to the given closure. |
static java.lang.Object |
DefaultGroovyMethods.withWriter(java.io.OutputStream stream,
java.lang.String charset,
Closure closure)
Creates a writer from this stream, passing it to the given closure. |
static void |
DefaultGroovyMethods.withWriter(java.lang.Process self,
Closure closure)
Creates a new BufferedWriter as stdin for this process, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. |
static java.lang.Object |
DefaultGroovyMethods.withWriter(java.io.Writer writer,
Closure closure)
Allows this writer to be used within the closure, ensuring that it is flushed and closed before this method returns. |
static java.lang.Object |
DefaultGroovyMethods.withWriterAppend(java.io.File file,
Closure closure)
Create a new BufferedWriter for this file in append mode. |
static java.lang.Object |
DefaultGroovyMethods.withWriterAppend(java.io.File file,
java.lang.String charset,
Closure closure)
Create a new BufferedWriter which will append to this file. |
Constructors in org.codehaus.groovy.runtime with parameters of type Closure | |
---|---|
ConvertedClosure(Closure closure)
|
|
ConvertedClosure(Closure closure,
java.lang.String method)
to create a ConvertedClosure object. |
|
CurriedClosure(Closure uncurriedClosure,
int i)
|
|
CurriedClosure(Closure uncurriedClosure,
java.lang.Object[] arguments)
|
Uses of Closure in org.codehaus.groovy.runtime.metaclass |
---|
Fields in org.codehaus.groovy.runtime.metaclass declared as Closure | |
---|---|
private Closure |
ClosureStaticMetaMethod.callable
|
private Closure |
ClosureMetaMethod.callable
|
private Closure |
ThreadManagedMetaBeanProperty.initialValueCreator
|
Methods in org.codehaus.groovy.runtime.metaclass that return Closure | |
---|---|
Closure |
ClosureStaticMetaMethod.getClosure()
Retrieves the closure that is invoked by this MetaMethod |
Closure |
ClosureMetaMethod.getClosure()
Retrieves the closure that is invoked by this MetaMethod |
Methods in org.codehaus.groovy.runtime.metaclass with parameters of type Closure | |
---|---|
private MetaMethod |
ClosureMetaClass.getDelegateMethod(Closure closure,
java.lang.Object delegate,
java.lang.String methodName,
java.lang.Class[] argClasses)
|
void |
ThreadManagedMetaBeanProperty.setInitialValueCreator(Closure callable)
Closure responsible for creating the initial value of thread-managed bean properties |
Constructors in org.codehaus.groovy.runtime.metaclass with parameters of type Closure | |
---|---|
ClosureMetaMethod(java.lang.String name,
java.lang.Class declaringClass,
Closure c)
|
|
ClosureMetaMethod(java.lang.String name,
Closure c)
|
|
ClosureStaticMetaMethod(java.lang.String name,
java.lang.Class declaringClass,
Closure c)
|
|
ThreadManagedMetaBeanProperty(java.lang.Class declaringClass,
java.lang.String name,
java.lang.Class type,
Closure initialValueCreator)
Constructs a new ThreadManagedBeanProperty for the given arguments |
Uses of Closure in org.codehaus.groovy.tools.shell.util |
---|
Constructors in org.codehaus.groovy.tools.shell.util with parameters of type Closure | |
---|---|
SimpleCompletor(Closure loader)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |