|
|||||||||||
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 the Swing GroovyMarkup builder |
groovy.util | Various Groovy utilities for working with nodes, builders, logging, JUnit test cases, text expressions, Ant tasks or JMX MBeans. |
org.codehaus.groovy.runtime | Runtime classes for Groovy - whether the dynamic interpreter is being used, the compiler or the bytecode generator. |
Uses of Closure in groovy.lang |
Methods in groovy.lang that return Closure | |
Closure |
Closure.asWritable()
|
Closure |
Closure.curry(java.lang.Object arguments)
Support for closure currying |
Closure |
ClosureException.getClosure()
|
Closure |
IncorrectClosureArgumentsException.getClosure()
|
Methods in groovy.lang with parameters of type Closure | |
void |
IntRange.step(int step,
Closure closure)
|
protected java.lang.Object |
MetaClass.createListenerProxy(java.lang.Class listenerType,
java.lang.String listenerMethodName,
Closure closure)
|
void |
ObjectRange.step(int step,
Closure 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 |
Constructors in groovy.mock with parameters of type Closure | |
ClosureConstraintMatcher(Closure closure)
|
Uses of Closure in groovy.model |
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 |
Methods in groovy.sql with parameters of type Closure | |
DataSet |
DataSet.findAll(Closure where)
|
void |
DataSet.each(Closure closure)
|
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.query(GString gstring,
Closure closure)
Performs the given SQL query calling the closure with the result set |
void |
Sql.queryEach(java.lang.String sql,
Closure closure)
Deprecated. please use eachRow instead |
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.queryEach(java.lang.String sql,
java.util.List params,
Closure closure)
Deprecated. please use eachRow instead |
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 |
void |
Sql.eachRow(GString gstring,
Closure closure)
Performs the given SQL query calling the closure with the result set |
void |
Sql.queryEach(GString gstring,
Closure closure)
Deprecated. please use eachRow instead |
Constructors in groovy.sql with parameters of type Closure | |
DataSet(DataSet parent,
Closure where)
|
Uses of Closure in groovy.swing.impl |
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.util |
Methods in groovy.util with parameters of type Closure | |
protected void |
GroovyTestCase.shouldFail(Closure code)
Asserts that the given code closure fails when it is evaluated |
void |
OrderBy.add(Closure closure)
|
Constructors in groovy.util with parameters of type Closure | |
BuilderSupport(Closure nameMappingClosure,
BuilderSupport proxyBuilder)
|
|
ClosureComparator(Closure closure)
|
|
OrderBy(Closure closure)
|
Uses of Closure in org.codehaus.groovy.runtime |
Subclasses of Closure in org.codehaus.groovy.runtime | |
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 with parameters of type Closure | |
void |
ClassExtender.addMethod(java.lang.String name,
Closure closure)
|
static void |
DefaultGroovyMethods.each(java.lang.Object self,
Closure closure)
Allows objects to be iterated through using a closure |
static void |
DefaultGroovyMethods.each(java.util.Collection self,
Closure closure)
Allows objects to be iterated through using a closure |
static void |
DefaultGroovyMethods.each(java.util.Map self,
Closure closure)
Allows a Map to be iterated through using a closure. |
static boolean |
DefaultGroovyMethods.every(java.lang.Object self,
Closure closure)
Iterates over every element of a collection, and check whether a predicate is valid for all elements. |
static boolean |
DefaultGroovyMethods.any(java.lang.Object self,
Closure closure)
Iterates over every element of a collection, and check whether a predicate is valid for at least one element |
static java.util.List |
DefaultGroovyMethods.collect(java.lang.Object self,
Closure closure)
Iterates through this object transforming each object into a new value using the closure as a transformer, returning a list of transformed values. |
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.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.lang.Object |
DefaultGroovyMethods.find(java.lang.Object self,
Closure closure)
Finds the first value matching the closure condition |
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 value matching the closure condition |
static java.util.List |
DefaultGroovyMethods.findAll(java.lang.Object self,
Closure closure)
Finds all values 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.List |
DefaultGroovyMethods.findAll(java.util.Map self,
Closure closure)
Finds all values matching the closure condition |
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.min(java.util.Collection self,
Closure closure)
Selects the minimum value found in the collection using the given closure as a comparator |
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.util.List |
DefaultGroovyMethods.sort(java.util.List self,
Closure closure)
A convenience method for sorting a List using a closure as a comparator |
static java.util.List |
DefaultGroovyMethods.sort(java.util.Collection self,
Closure closure)
A convenience method for sorting a Collection using a closure as a comparator |
static void |
DefaultGroovyMethods.reverseEach(java.util.List self,
Closure closure)
Iterate over each element of the list in the reverse order. |
static void |
DefaultGroovyMethods.times(java.lang.Number self,
Closure closure)
Iterates a number of times |
static void |
DefaultGroovyMethods.upto(java.lang.Number self,
java.lang.Number to,
Closure closure)
Iterates from this number up to the given number |
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 void |
DefaultGroovyMethods.eachLine(java.io.File self,
Closure closure)
Iterates through the given file line by line |
static void |
DefaultGroovyMethods.eachLine(java.io.Reader self,
Closure closure)
Iterates through the given reader line by line |
static void |
DefaultGroovyMethods.splitEachLine(java.io.File self,
java.lang.String sep,
Closure closure)
Iterates through the given 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 on the seperator |
static void |
DefaultGroovyMethods.eachFile(java.io.File self,
Closure closure)
Invokes the closure for each file in the given directory |
static void |
DefaultGroovyMethods.withReader(java.io.File file,
Closure closure)
Helper method to create a new BufferedReader for a file and then passes it into the closure and ensures its closed again afterwords |
static void |
DefaultGroovyMethods.withOutputStream(java.io.File file,
Closure closure)
Helper method to create a new OutputStream for a file and then passes it into the closure and ensures its closed again afterwords |
static void |
DefaultGroovyMethods.withInputStream(java.io.File file,
Closure closure)
Helper method to create a new InputStream for a file and then passes it into the closure and ensures its closed again afterwords |
static void |
DefaultGroovyMethods.withWriter(java.io.File file,
Closure closure)
Helper method to create a new BufferedWriter for a file and then passes it into the closure and ensures it is closed again afterwords |
static void |
DefaultGroovyMethods.withWriter(java.io.File file,
java.lang.String charset,
Closure closure)
Helper method to create a new BufferedWriter for a file in a specified encoding and then passes it into the closure and ensures it is closed again afterwords |
static void |
DefaultGroovyMethods.withWriterAppend(java.io.File file,
java.lang.String charset,
Closure closure)
Helper method to create a new BufferedWriter for a file in a specified encoding in append mode and then passes it into the closure and ensures it is closed again afterwords |
static void |
DefaultGroovyMethods.withPrintWriter(java.io.File file,
Closure closure)
Helper method to create a new PrintWriter for a file and then passes it into the closure and ensures its closed again afterwords |
static void |
DefaultGroovyMethods.withWriter(java.io.Writer writer,
Closure closure)
Allows a writer to be used, calling the closure with the writer and then ensuring that the writer is closed down again irrespective of whether exceptions occur or the |
static void |
DefaultGroovyMethods.withReader(java.io.Reader writer,
Closure closure)
Allows a Reader to be used, calling the closure with the writer and then ensuring that the writer is closed down again irrespective of whether exceptions occur or the |
static void |
DefaultGroovyMethods.withStream(java.io.InputStream stream,
Closure closure)
Allows a InputStream to be used, calling the closure with the stream and then ensuring that the stream is closed down again irrespective of whether exceptions occur or the |
static void |
DefaultGroovyMethods.eachLine(java.io.InputStream stream,
Closure closure)
Iterates through the given stream line by line |
static void |
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 and ensures its closed again afterwords |
static void |
DefaultGroovyMethods.withWriter(java.io.OutputStream stream,
Closure closure)
Allows an output stream to be used, calling the closure with the output stream and then ensuring that the output stream is closed down again irrespective of whether exceptions occur |
static void |
DefaultGroovyMethods.withWriter(java.io.OutputStream stream,
java.lang.String charset,
Closure closure)
Allows an output stream to be used, calling the closure with the output stream and then ensuring that the output stream is closed down again irrespective of whether exceptions occur. |
static void |
DefaultGroovyMethods.withStream(java.io.OutputStream stream,
Closure closure)
Allows a OutputStream to be used, calling the closure with the stream and then ensuring that the stream is closed down again irrespective of whether exceptions occur. |
static void |
DefaultGroovyMethods.eachByte(java.io.File self,
Closure closure)
Iterates through the given file byte by byte. |
Constructors in org.codehaus.groovy.runtime with parameters of type Closure | |
ClosureListener(java.lang.String listenerMethodName,
Closure closure)
|
|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |