classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Introspector.getBeanInfo(class, int)


From: Robert Schuster
Subject: Re: [cp-patches] Introspector.getBeanInfo(class, int)
Date: Mon, 29 Aug 2005 23:44:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.8) Gecko/20050514

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Aaron,
now that I have PC and internet I found this discussion. Since I am working in
the java.beans package for some time I stepped on getBeanInfo(Class, int) before
and can explain how it is supposed to work (If you know the terms it is actually
pretty simple.)

At first: We can have a two types of bean infos. One is given by the programmer
(or designer) using the special BeanInfo class (It works through special class
names, ie. if you bean class is Foo than the corresponding info is called
FooBeanInfo). If such an information class does not exist the beans framework
can create it on the fly (using the Introspector).

Imagine that a bean class has many parent bean classes and each of them can have
a corresponding (non-autogenerated) bean info class.

The integer parameter of getBeanInfo(Class, int) decides when to use the
explicit (programmer given) or implicit (auto-generated) beaninfo data.

USE_ALL_BEANINFO - take all explicit beaninfos (all superclasses and the class
itself) you can get (or automatically fall back to the implicit ones)

IGNORE_IMMEDIATE_BEANINFO - use explicit beaninfo from superclasses but not the
class itself (or fall back to the automatically generated infos)

IGNORE_ALL_BEANINFO - use the automatically generated infos only

I hope this clears the matter a bit.

Btw: I have started writing a testcase for this (tedious ...) and once had a
working getBeanInfo implementation but lost the patch when I had to rebuild the
filesystem tree on my reiserfs formatted hd. :(

Please tell me if you want to work on this. Otherwise I would look at it again
and maybe finish it soon.

cu
Robert



Aaron Luchko wrote:
> On Wed, 2005-08-10 at 10:49 -0600, Tom Tromey wrote:
> 
>>>>>>>"Aaron" == Aaron Luchko <address@hidden> writes:
>>
>>Aaron> My understanding from that is USE_ALL_BEANINFO is equivalent to just
>>Aaron> getBeanInfo(class). IGNORE_IMMEDIATE_BEANINFO would I guess be BeanInfo
>>Aaron> on all the superclasses but not the class itself. 
>>IGNORE_ALL_BEANINFO...
>>Aaron> BeanInfo with nothing???
>>
>>Yeah, I don't know about IGNORE_ALL_BEANINFO.
>>
>>Aaron> Either way whatever combination of beans and flags I try I'm getting
>>Aaron> exactly the same results and I can't tell what, if anything, these 
>>flags
>>Aaron> are doing.
>>
>>One approach might be to see if you can find code out there that uses
>>these flags, and work backward from there.
> 
> 
> I've searched google high and low and the only code I could find is the
> eclipse class which uses it and is the reason I'm trying to implement it
> in the first place (btw this link is to EPL'd code) .
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gef/src/org/eclipse/gef/tools/AbstractTool.java?cvsroot=Tools_Project
> 
> I'm not sure what they're doing with it there and still can't uncover
> any differences.
> 
> Aaron
> 
> 
> 
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDE4HBG9cfwmwwEtoRAn3aAJ9b017qmRe+ymkk5q3oLA7pFuFBBgCfQKE4
gCWkJs2eBYocXHj1y5NkP2c=
=kIH9
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]