I want to create a class which proxies all calls to methods to its superclass with log information (i.e. before/after statements, for example).
However, the framework using this class will be loading it via the new (..) invocation, or else, via other reflection mechanisms, so I can't use the Proxy semantics to launch the class.
Is there a way to get the new and newInstance() operations to use a Proxy in all cases - or do we have to explictly create instances of a InvocationHandler class using the Proxy API?
Specifically: I'm debugging a distributed framework which already has its own way of creating class instances from XML files at runtime (hadoop - mapreduce).