Is there a way in Eclipse to generate a proxy class (as in proxy pattern, not a remote call)? Something along the lines of this
public class FooBar{
public int getBiz(){
return 1234;
}
}
generates
public class FooBarProxy{
protected FooBar foobar;
public FooBarProxy(FooBar f) {...}
public int getBiz(){
return foobar.getBiz()
}
}
Create the proxy class yourself, and add the FooBar instance variable. Select the variable, right click-->source-->generate delegate methods
Why not use java's built in dynamic proxy. It generates a proxy at runtime:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With