Effective Java, along with other sources suggest that we should consider using composition over inheritance. I have often found my self achieving such composition by using the Decorator pattern and implementing forwarding methods that delegate invocations to a wrapped object.
However, I often find myself writing many simple forwarding methods of the type:
public void myMethod(String name) {
instance.myMethod(name);
}
Is there anyway of auto-generating these forwarding methods within Eclipse (3.4.x)?