Does Groovy have support for something like Ruby Modules? -


ruby modules make things passing database connection or other dependencies various objects easier while allowing separation of concerns. groovy support similar functionality? , if called?

in ruby modules used either mixins or namespace class (e.g. net::http).

to mixin behavior can use @mixin annotation. examples here http://groovy.codehaus.org/category+and+mixin+transformations.

to namespace, groovy uses same mechanism java i.e. using packages (e.g. groovy.sql.sql).

i not sure if answered question or not. dependency injection, while common mixin way in ruby (or in scala/play), have not seen done lot using @mixin in groovy. di container spring used.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -