Easing the occasional metaClass pain

So in the last lesson we covered what you can do with metaClasses and Groovy to print some info about the classLoader. This is about how to make that a little easier on you. I was originally going to work this as using ExpandoMetaClass, but there were some things it did, that I didn't need …

metaClass things to remember

So I just read a post where a kind of cool debug was posted by Jochen Theodorou (blackdrag) The Groovy Project Tech Lead (http://groovy.codehaus.org) http://blackdragsview.blogspot.com/ http://www.g2one.com/ Anyway, I thought this was a great example of something that could be done with a metaClass change. I want to debug something so I do object.debug() You're asking, …

metaClass tips

MetaClass fun... A metaClass is a way to add a method-like statement to an existing Class at runtime. I don't know another way to say it really. For the JavaScript gurus out there, this is the same as the prototype if you rewrote the code I provide swapping metaClass with prototype they'd be the same …

%d bloggers like this: