Hi,
I'm having a problem or a misunderstanding with BeanInfo.
I have a class Alpha, and a class Beta. Beta extends Alpha. I've
created an AlphaBeanInfo class.
The following code works fine:
BeanInfo info = Introspector.getBeanInfo(Alpha.class);
...
Problem is though when I call the following code:
BeanInfo info = Introspector.getBeanInfo(Beta.class);
...
AlphaBeanInfo is not returned, nor are any of its methods called
(verified via debugging)
Shouldn't this be returned by the Introspector? I could of course write
a BetaBeanInfo, but this seems silly to have to do this.
Any ideas/clarifications?
Many thanks,
M
Martha Goys - 27 Jan 2005 07:52 GMT
> I'm having a problem or a misunderstanding with BeanInfo.
> I have a class Alpha, and a class Beta. Beta extends Alpha. I've
[quoted text clipped - 15 lines]
> Shouldn't this be returned by the Introspector? I could of course write
> a BetaBeanInfo, but this seems silly to have to do this.
The workaround/solution I found was to have the class Alpha implement
BeanInfo interface.
-M