narkisr


Member since 01/15/2008

12 snippets

5342 profile views

4 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

narkisr's Recent Groovy Snippets



« Prev 1 Next »
This is excellent for testing (mocking a SOAP server for example), we use an in memory http server in order to answer client requests.
0 887 posted 14 years ago by narkisr
An easy way to launch an external process (http://docs.codehaus.org/display/GroovyJSR/Run+Sub-Process+Safely).
1 750 posted 15 years ago by narkisr
Clojsure composition in Groovy (functional style programing). @http://www.ibm.com/developerworks/java/library/j-pg08235/index.html
0 610 posted 15 years ago by narkisr
An example of utilizing a category in Groovy in order to create withIndexfunctionality on lists each methods (traversing the list and having the index on each step), @ http://markmail.org/message/pa2irg4mvydpxi7c
0 651 posted 15 years ago by narkisr
A nice example of utilizing Groovy closures in order to create a when statement in Groovy (http://www.transentia.com.au/flatpress/?x=entry:entry090311-222726).
0 727 posted 15 years ago by narkisr
This, owner, and delegate: this : as in Java, this refers to the instance of the enclosing class where a Closure is defined owner : the enclosing object (this or a surrounding closure) delegate : by default the same as owner, but changeable. (htt...
1 822 posted 15 years ago by narkisr
Groovy ranges works on dates also! (http://kousenit.wordpress.com/2009/02/02/groovy-groundhogs/)
2 745 posted 15 years ago by narkisr
An example on how to invoke Ant targets which are defined in build.xml.
0 605 posted 15 years ago by narkisr
This example shows how to clone an object from an existing one by using MOP in Groovy, first we find all the writable properties of the cloned object class, secondly we traverse them and on each iteration we copy the value from the current object i...
2 1168 posted 15 years ago by narkisr
Generating MD5 HEX string from either URL or File instance in Groovy (more elegant than the Java version).
1 1137 posted 15 years ago by narkisr
Decorator design pattern implemented in Groovy, two implementation are provided, the first is naive and not general, the second is MOP based and can be used in much more scenarios.
0 870 posted 16 years ago by narkisr
Mediator design pattern implemented in Groovy (based upon http://www.javacamp.org/designPattern/).
1 722 posted 16 years ago by narkisr
« Prev 1 Next »