groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: Groovy Library of "helper" methods
Date Sun, 03 Apr 2016 05:27:41 GMT
On 01.04.2016 16:40, Guy Matz wrote:
> Hi!  I have some groovy methods that I would like to make generally
> available to job in jenkins  . . .  does anyone have any recommendations
> for creating a library of methods?  Should they be static methods?  NOT
> static?  Any thoughts would be greatly appreciated.

You could consider writing extension methods, or at least write your 
library so it can be used for extension methods or categories. That 
would mean static methods, with the first parameter being the class you 
want that methods to be working on later.

If you wanted to make a String.foo(int) method, you would define a 
method static foo(String, int) for example.

> Oh!  And does anyone have any advice on how to set up a dev environment
> to develop this sort of thing for Jenkins?  I find it awkward to develop
> when I don't have access to all of the objects that would be available
> within a jenkins instance.

Sorry, I have never done anything for Jenkins

bye Jochen


Mime
View raw message