Re: Dealing with Repository class.

Enver Haase <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Organization FU Berlin
Message-ID <02041621011601.00286@haneman>
*sigh*

I think a "Repository" by its very definition is a singleton.

If you for some reason want to use multiple instances (to run
multiple BCEL programs in one JVM), why don't you consider
using real class loaders?

I agree some methods could or should be moved to JavaClass (these
having two JavaClass in the signature) and I agree Repository should be 
parameterizable for using other paths than the system's class path.

However, I don't think it's a bad idea to have one central point
of class file access - it's very uncommon to have more than one
definition of a class with the same names.

However, if you really want to do it all in a somewhat over-engineered
(subjective), object-oriented way:

DDP: I think your approach is good. However, I don't know why JavaClass
     objects should point back to their repository.
     To make the new jc.instanceof() and friends only use the ClassRepository 
     where jc itself originated from?


Greetings,
Enver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.