[jboss-user] [Javassist user questions] - Suggestion for CodeConverter

memeplex do-not-reply at jboss.com
Sat Mar 29 17:37:06 EDT 2008


Hi all,

I would like to make a simple suggestion that imo would make the
javassist's CodeConverter a lot more useful than it is now.

Namely, that the static replacements for fields and methods take not
only the target object but the respective ctfield or ctmethod also.
This way, you're not forced to keep a 1-1 relation between the
replacements and the originals, being able to dynamically change
reaction in view of the currently accessed field or method instead.

For example a replacement for a field read could lookup a bean in a
registry addressing it by a name that could be the field name itself,
or a name synthesized from its class, or maybe an identifier provided
by an annotation. This would implement an style of dependency
injection.

What do you think?

Regards
-Carlos

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139876#4139876

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139876



More information about the jboss-user mailing list