jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enver Haase <eha...@inf.fu-berlin.de>
Subject Re: Dealing with Repository class.
Date Tue, 16 Apr 2002 19:01:16 GMT


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?


To unsubscribe, e-mail:   <mailto:bcel-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-dev-help@jakarta.apache.org>

View raw message