Wednesday, March 19, 2008

Groovy Meta Libraries

The more and more I write Groovy, the more I really like its meta-programming (Meta-Object Protocol or MOP) capabilities. I find myself frequently refactoring code into meta methods of existing Java classes that would have otherwise been methods in some utility classes. I am slowly building a libraries of these I would like to reuse. Unfortunately one thing that challenges me is what is the best practices for turning them into reusable meta libraries. I would like to be able to package them in a jar and just drop them in the classpath and they would be automatically available(bootstrapped). This would make them easier to carry between projects and share with the community. There would also have to be a good way of creating good GroovyDoc like we have with the GDK. If somebody has a recommendation or idea I would love to hear it. Otherwise, I wonder if there could be a standard way to use the Java jar service provider mechanism like JDBC driver do now to auto register.

No comments: