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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -