Jason Richard wrote:Winston. My thought was to be able to drop a library into an existing project, and if it's there include the new functionality. If it's not there, don't.
Hmmm, Dynamic extensions. Sounds to me like something for a custom ClassLoader (or possibly DI); not reflection.
Most of the new functionality would run independent of most of the other items in the existing project (with a couple minor exceptions)
And I hate to say, but it's those "exceptions" that are likely to bite you ITA. However, if you already have a set of
interfaces that any "additions" have to implement, it might be a lot easier. Indeed, that's how a lot of custom factories for things like
JDBC work.
Plus it's always fun to work with stuff you haven't done too much with yet.
Hm. To a point. And mine usually precludes reflection, because I don't want to have to write the
test rigs for it (or indeed the code). Hey, colour me "lazy".
However, Jesper seems to have solved your problem without reflection (not quite sure where the "inner class" bit comes from though), so give it a try.
As with almost everything in programming, there's almost always more than one way to skin a cat.
Winston