Hi,
I have a DSL where I want to pass named arguments like follows:
def foo(String a, String b, String c, Closure d) {
}
foo(a=“a”, c=“c”, b=“b”) {
}
I’m aware that named arguments are supported by receiving the arguments with a
map:
def foo(Map obj, Closure c) {
}
I was referring to a compile-time generation of the class -- that the Closure
itself that is normally generated implements the interface natively. That would
make it equivalent to anonymous class in Java 7 and earlier for calling
functional (or any SAM type) methods. That wouldn't have any
Suppose I have:
class Blah { void doit(Closure c) }
Used so:
Blah b = new Blah<>("abc")
b.doit {it.trim()}
Is there a ClosureSignatureHint that specifies this?
This method from DGM is what I'd want, except doit is an instance method and
not a static one, so I can't use "FirstParam"
public
I love Groovy. I also love the new streams functionality in JDK 8. But, I am
weary of the performance implications of Groovy + Streams, because to use
streams you must use Groovy closures. I see the code generated creates a new
closure instance then uses castToType to cast the closure to the
Hi Daniel,
I think that the problem you are facing is that when your code calls:
List datalist = sourceDB.rows(...)
all the records in the resultset are retrieved by Groovy and added to the
datalist List (implemented by an ArrayList).
If the resultset is large (e.g. 2GB) then the memory
Good job :)
Cheers,
Daniel.Sun
--
View this message in context:
http://groovy.329449.n5.nabble.com/Http-Builder-NG-tp5736876p5736879.html
Sent from the Groovy Users mailing list archive at Nabble.com.
Hi,
I have written a groovy template script to be integrated to the E-mail Extn
plugin in Jenkins for sending customised reports.
The idea is to to parse the jUNIT Test reports from Jenkins and add the test
results in a tabular format. The problem is the "Test Pass Count", "Test
Fail Count",