Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / January 2005

Tip: Looking for answers? Try searching our database.

Finding BeanInfo for superclass?

Thread view: 
Martha Goys - 11 Jan 2005 08:27 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.