|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Closure | |
groovy.lang | |
groovy.mock | |
groovy.model | |
groovy.sql | |
groovy.swing.impl | |
groovy.util | |
org.codehaus.groovy.runtime | |
org.codehaus.groovy.sandbox.markup |
Uses of Closure in groovy.lang |
Methods in groovy.lang that return Closure | |
Closure |
MetaClass.getMethodPointer(Object object,
String methodName)
Returns a callable object for the given method name on the object. |
Closure |
Closure.asWritable()
|
Closure |
Closure.curry(Object[] arguments)
Support for closure currying |
Closure |
IncorrectClosureArgumentsException.getClosure()
|
Closure |
ClosureException.getClosure()
|
Methods in groovy.lang with parameters of type Closure | |
protected Object |
MetaClass.createListenerProxy(Class listenerType,
String listenerMethodName,
Closure closure)
|
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. |
void |
ObjectRange.step(int step,
Closure closure)
|
void |
IntRange.step(int step,
Closure closure)
|
void |
EmptyRange.step(int step,
Closure closure)
|
Constructors in groovy.lang with parameters of type Closure | |
IncorrectClosureArgumentsException(Closure closure,
Object arguments,
Class[] expected)
|
|
ClosureException(Closure closure,
Throwable cause)
|
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(Object headerValue,
Closure readClosure,
Closure writeClosure,
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,
Class type)
|
Uses of Closure in groovy.sql |
Methods in groovy.sql with parameters of type Closure | |
void |
Sql.query(String sql,
Closure closure)
Performs the given SQL query calling the closure with the result set |
void |
Sql.query(String sql,
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(String sql,
Closure closure)
Deprecated. please use eachRow instead |
void |
Sql.eachRow(String sql,
Closure closure)
Performs the given SQL query calling the closure with each row of the result set |
void |
Sql.queryEach(String sql,
List params,
Closure closure)
Deprecated. please use eachRow instead |
void |
Sql.eachRow(String sql,
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 |
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. |
DataSet |
DataSet.findAll(Closure where)
|
void |
DataSet.each(Closure closure)
|
DataSet |
DataSet.createView(Closure criteria)
|
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 | |
void |
OrderBy.add(Closure closure)
|
protected void |
BuilderSupport.setClosureDelegate(Closure closure,
Object node)
A strategy method to allow derived builders to use builder-trees and switch in different kinds of builders. |
protected void |
GroovyTestCase.shouldFail(Closure code)
Asserts that the given code closure fails when it is evaluated |
protected void |
GroovyTestCase.shouldFail(Class clazz,
Closure code)
Asserts that the given code closure fails when it is evaluated and that a particular exception is thrown. |
Constructors in groovy.util with parameters of type Closure | |
OrderBy(Closure closure)
|
|
ClosureComparator(Closure closure)
|
|
BuilderSupport(Closure nameMappingClosure,
BuilderSupport proxyBuilder)
|
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 that return Closure | |
static Closure |
ScriptBytecodeAdapter.getMethodPointer(Object object,
String methodName)
Returns the method pointer for the given object name |
static Closure |
InvokerHelper.getMethodPointer(Object object,
String methodName)
Returns the method pointer for the given object name |
Closure |
Invoker.getMethodPointer(Object object,
String methodName)
Returns the method pointer for the given object name |
Methods in org.codehaus.groovy.runtime with parameters of type Closure | |
static Thread |
DefaultGroovyStaticMethods.start(Thread self,
Closure closure)
Start a Thread with the given closure as a Runnable instance. |
static Thread |
DefaultGroovyStaticMethods.startDaemon(Thread self,
Closure closure)
Start a daemon Thread with the given closure as a Runnable instance. |
static void |
DefaultGroovyStaticMethods.sleep(Object object,
long seconds,
Closure onInterrupt)
Sleep for so many seconds |
static void |
GroovyCategorySupport.use(Class clazz,
Closure closure)
|
static void |
GroovyCategorySupport.use(List classes,
Closure closure)
|
void |
ClassExtender.addMethod(String name,
Closure closure)
|
static Object |
DefaultGroovyMethods.identity(Object self,
Closure closure)
Allows the closure to be called for the object reference self |
static void |
DefaultGroovyMethods.eachPropertyName(Object self,
Closure closure)
|
static void |
DefaultGroovyMethods.eachProperty(Object self,
Closure closure)
|
static void |
DefaultGroovyMethods.use(Object self,
Class categoryClass,
Closure closure)
Scoped use method |
static void |
DefaultGroovyMethods.use(Object self,
List categoryClassList,
Closure closure)
Scoped use method with list of categories |
static void |
DefaultGroovyMethods.each(Object self,
Closure closure)
Allows objects to be iterated through using a closure |
static void |
DefaultGroovyMethods.eachWithIndex(Object self,
Closure closure)
Allows object to be iterated through a closure with a counter |
static void |
DefaultGroovyMethods.each(Collection self,
Closure closure)
Allows objects to be iterated through using a closure |
static void |
DefaultGroovyMethods.each(Map self,
Closure closure)
Allows a Map to be iterated through using a closure. |
static boolean |
DefaultGroovyMethods.every(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(Object self,
Closure closure)
Iterates over every element of a collection, and check whether a predicate is valid for at least one element |
static List |
DefaultGroovyMethods.collect(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 Collection |
DefaultGroovyMethods.collect(Object self,
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 List |
DefaultGroovyMethods.collect(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 Collection |
DefaultGroovyMethods.collect(Collection self,
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 Collection |
DefaultGroovyMethods.collect(Map self,
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 List |
DefaultGroovyMethods.collect(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 Object |
DefaultGroovyMethods.find(Object self,
Closure closure)
Finds the first value matching the closure condition |
static Object |
DefaultGroovyMethods.find(Collection self,
Closure closure)
Finds the first value matching the closure condition |
static Object |
DefaultGroovyMethods.find(Map self,
Closure closure)
Finds the first value matching the closure condition |
static List |
DefaultGroovyMethods.findAll(Object self,
Closure closure)
Finds all values matching the closure condition |
static List |
DefaultGroovyMethods.findAll(Collection self,
Closure closure)
Finds all values matching the closure condition |
static Map |
DefaultGroovyMethods.findAll(Map self,
Closure closure)
Finds all entries matching the closure condition. |
protected static Object |
DefaultGroovyMethods.callClosureForMapEntry(Closure closure,
Map.Entry entry)
|
static Object |
DefaultGroovyMethods.inject(Collection self,
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 Object |
DefaultGroovyMethods.inject(Object[] self,
Object value,
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 Object |
DefaultGroovyMethods.min(Collection self,
Closure closure)
Selects the minimum value found in the collection using the given closure as a comparator |
static Object |
DefaultGroovyMethods.max(Collection self,
Closure closure)
Selects the maximum value found in the collection using the given closure as a comparator |
static String |
DefaultGroovyMethods.replaceAll(String self,
String regex,
Closure closure)
Replaces all occurrencies of a captured group by the result of a closure on that text. |
static List |
DefaultGroovyMethods.sort(List self,
Closure closure)
A convenience method for sorting a List using a closure as a comparator |
static List |
DefaultGroovyMethods.sort(Collection self,
Closure closure)
A convenience method for sorting a Collection using a closure as a comparator |
static void |
DefaultGroovyMethods.reverseEach(List self,
Closure closure)
Iterate over each element of the list in the reverse order. |
static void |
DefaultGroovyMethods.times(Number self,
Closure closure)
Iterates a number of times |
static void |
DefaultGroovyMethods.upto(Number self,
Number to,
Closure closure)
Iterates from this number up to the given number |
static void |
DefaultGroovyMethods.upto(long self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.upto(Long self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.upto(float self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.upto(Float self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.upto(Double self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.upto(BigInteger self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.upto(BigDecimal self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(Number self,
Number to,
Closure closure)
Iterates from this number down to the given number |
static void |
DefaultGroovyMethods.downto(long self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(Long self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(float self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(Float self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(double self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(Double self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(BigInteger self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.downto(BigDecimal self,
Number to,
Closure closure)
|
static void |
DefaultGroovyMethods.step(Number self,
Number to,
Number stepNumber,
Closure closure)
Iterates from this number up to the given number using a step increment |
static void |
DefaultGroovyMethods.eachObject(File self,
Closure closure)
Iterates through the given file object by object |
static void |
DefaultGroovyMethods.eachObject(ObjectInputStream ois,
Closure closure)
Iterates through the given object stream object by object |
static void |
DefaultGroovyMethods.eachLine(File self,
Closure closure)
Iterates through the given file line by line |
static void |
DefaultGroovyMethods.eachLine(Reader self,
Closure closure)
Iterates through the given reader line by line |
static void |
DefaultGroovyMethods.splitEachLine(File self,
String sep,
Closure closure)
Iterates through the given file line by line, splitting on the seperator |
static void |
DefaultGroovyMethods.splitEachLine(Reader self,
String sep,
Closure closure)
Iterates through the given reader line by line, splitting on the seperator |
static void |
DefaultGroovyMethods.eachFile(File self,
Closure closure)
Invokes the closure for each file in the given directory |
static void |
DefaultGroovyMethods.eachFileRecurse(File self,
Closure closure)
Invokes the closure for each file in the given directory and recursively. |
static void |
DefaultGroovyMethods.eachDir(File self,
Closure closure)
Invokes the closure for each directory in the given directory, ignoring regular files. |
static void |
DefaultGroovyMethods.eachFileMatch(File self,
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. |
static void |
DefaultGroovyMethods.runAfter(Timer timer,
int delay,
Closure closure)
Allow simple syntax for using timers. |
static void |
DefaultGroovyMethods.withReader(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(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(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(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(File file,
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(File file,
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(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(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(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(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(InputStream stream,
Closure closure)
Iterates through the given stream line by line |
static void |
DefaultGroovyMethods.eachLine(URL url,
Closure closure)
Iterates through the lines read from the URL's associated input stream |
static void |
DefaultGroovyMethods.withReader(URL url,
Closure closure)
Helper method to create a new BufferedReader for a URL and then passes it into the closure and ensures its closed again afterwords |
static void |
DefaultGroovyMethods.withReader(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(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(OutputStream stream,
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(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(File self,
Closure closure)
Traverse through each byte of the specified File |
static void |
DefaultGroovyMethods.eachByte(InputStream is,
Closure closure)
Traverse through each byte of the specified stream |
static void |
DefaultGroovyMethods.eachByte(URL url,
Closure closure)
Traverse through each byte of the specified URL |
static void |
DefaultGroovyMethods.transformChar(Reader reader,
Writer writer,
Closure closure)
Transforms the characters from a reader with a Closure and write them to a writer |
static void |
DefaultGroovyMethods.transformLine(Reader reader,
Writer writer,
Closure closure)
Transforms the lines from a reader with a Closure and write them to a writer |
static void |
DefaultGroovyMethods.filterLine(Reader reader,
Writer writer,
Closure closure)
Filter the lines from a reader and write them on the writer, according to a closure which returns true or false. |
static Writable |
DefaultGroovyMethods.filterLine(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(File self,
Writer writer,
Closure closure)
Filter the lines from a File and write them on a writer, according to a closure which returns true or false |
static Writable |
DefaultGroovyMethods.filterLine(Reader reader,
Closure closure)
Filter the lines of a Reader and create a Writable in return to stream the filtered lines |
static Writable |
DefaultGroovyMethods.filterLine(InputStream self,
Closure predicate)
Filter lines from an input stream using a closure predicate |
static void |
DefaultGroovyMethods.filterLine(InputStream self,
Writer writer,
Closure predicate)
Filters lines from an input stream, writing to a writer, using a closure which returns boolean and takes a line. |
static void |
DefaultGroovyMethods.withStreams(Socket socket,
Closure closure)
Allows an InputStream and an OutputStream from a Socket to be used, calling the closure with the streams and then ensuring that the streams are closed down again irrespective of whether exceptions occur. |
static Socket |
DefaultGroovyMethods.accept(ServerSocket serverSocket,
Closure closure)
Allow to pass a Closure to the accept methods of ServerSocket |
static void |
DefaultGroovyMethods.eachMatch(String self,
String regex,
Closure closure)
Process each regex group matched substring of the given string. |
static void |
DefaultGroovyMethods.each(Matcher self,
Closure closure)
Process each matched substring of the given group matcher. |
static int |
DefaultGroovyMethods.findIndexOf(Object self,
Closure closure)
Iterates over every element of the collection and return the index of the first object that matches the condition specified in the closure |
Constructors in org.codehaus.groovy.runtime with parameters of type Closure | |
ClosureListener(String listenerMethodName,
Closure closure)
|
Uses of Closure in org.codehaus.groovy.sandbox.markup |
Fields in org.codehaus.groovy.sandbox.markup declared as Closure | |
protected Closure |
Builder.Built.root
|
Methods in org.codehaus.groovy.sandbox.markup with parameters of type Closure | |
abstract Object |
Builder.bind(Closure root)
|
Object |
BaseMarkupBuilder.bind(Closure root)
|
Constructors in org.codehaus.groovy.sandbox.markup with parameters of type Closure | |
Builder.Built(Closure root,
Map namespaceTagMap)
|
|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |