Nicola Ken Barozzi wrote:<snip/>
Well, there is a way out, but I don't know if we want to do it. It's based on - ok, I'll say that word - an AOP interceptor mechanism(hehehe a big wording for a simple concept).
Interesting idea - but does it work? Both interfaces Loggable and LogEnabled
declare the same method getLogger() (with the same arguments) but with
a different return type. How do you know which version is queried in
your invokation handler? (I have not done too much with Proxies so I might
be simply too blind ...)
Yep. I think proxies aren't the solution here, since we deal with incompatible bytecode. We may, however, use a classloader that adapts byte code on the fly. But this would be IMO too much hidden magic, and it's better to invite people to recompile their code.
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }