« Return to Thread: Best way to do AOP-like stunts?

Best way to do AOP-like stunts?

by Robert Fischer :: Rate this Message:

Reply to Author | View in Thread

I'd like to wrap all calls into a particular library that contain a particular type of argument, and
then do some adjustment to that argument before it continues processing.  I specifically do *not*
want to override/define invokeMethod, because I suspect someone else might be hijacking that for
their own nefarious purposes, and I'm concerned I'll trounce their work (or vice versa).  What's the
best way to go about this?  If I iterate over the MetaMethods, I'm not entirely sure how to redefine
the calls so that my new implementation can call the old implementation with the appropriately
mangled argument.  Is there an idiom I should be using for this kind of behavior?

What I really want is something like Java 7's method handles...

~~ Robert Fischer, Smokejumper IT Consulting.
Enfranchised Mind Blog http://EnfranchisedMind.com/blog

Check out my book, "Grails Persistence with GORM and GSQL"!
http://www.smokejumperit.com/redirect.html



signature.asc (201 bytes) Download Attachment

 « Return to Thread: Best way to do AOP-like stunts?