commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <>
Subject Re: [Jelly] Creating Classes
Date Tue, 14 Jan 2003 15:00:34 GMT

James Strachan wrote:
> From: "Mark R. Diggory" <>
>>The struggle I have is that the new class/object needs to be
>>introspectable using native java.lang.reflection utilities, I don't know
>>if DynaBean can do this. Can it?
> No it can't. Can you patch the introspection code to be DynaBean friendly?
> e.g. beanutils is DynaBean aware, so if you used that for your
> introspection, you'd get DynaBean support for free. (Incidentally reflection
> & introspection are slightly different things).

The code is in another projects package, I'd really want to stay away 
from manipulating it.

> Another approach could be to build something like the dynabean library that
> uses BCEL underneath the covers to generate dynamic bytecode at runtime
> Indeed maybe you could create a special kind of DynaClass which could
> actually use BCEL to generate a real bean class which could then be
> instantiated inside a DynaBean, so that it could still be used as a DynaBean
> but which the real, underlying Java object could be extracted and passed
> into your reflection/introspection code. That'd be kinda cool :-).

Cool, this is right up my alley. Thanks for the pointer. I let you know 
how it goes.


View raw message