I currently use Javaassist to generate a proxy for a class:
ProxyFactory f = new ProxyFactory();
f.setSuperclass(JFrame.class); // Just an example.
// I would like to create a proxy for JFrame to
// fill with method implementations...
f.setHandler(handler); // ... in an own handler
Class<?> proxyClazz = f.createClass();
My problem is: The JFrame constructor is also called. Makes sense. But I dont want this. I would like to generate an empty class as proxy which is assign-compatible to other normal JFrames.
Is there a way to do this? Thank you for all ideas and thoughts.
create object instance of given class typewhen you saidcreate class?