Fast implement wrapping (delegate methods) in Eclipse?

Suzan Cioc picture Suzan Cioc · Mar 13, 2013 · Viewed 6.9k times · Source

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.

Answer

sharakan picture sharakan · Mar 13, 2013

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