Generating java proxy class in Eclipse

Viewed 3808

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()
    } 
}
2 Answers
Related