javaeclipsewrappercode-assistcode-templates

Fast implement wrapping (delegate methods) in Eclipse?


Is there some template or something to implement iterface methods with accessing to wrapped member?

For example, suppose I have

public class MyClass implements List<Something> {

    private final List<Something> core;

...
}

and now I want to implement List<Something> by passing calls to wrapped like

@Override
public int size() {
    return core.size();
}

and so on.


Solution

  • There is. Use Source menu->Generate Delegate Methods...