Community
Participate
Working Groups
Build Identifier: Version: Indigo Release Build id: 20110615-0604 It seems that the feature "Generate Delegate Methods..." from the Java tooling only allows for generating delegates for public methods. In some class hierarchies, it would also be useful to generate methods with a lower visibility (i.e. protected and default). I'm guessing that generating private delegate methods doesn't make sense, though Reproducible: Always Steps to Reproduce: 1. Use the attached Eclipse project 2. Go to the "Wrapper" class 3. Right-click, choose "Source" > "Generate Delegate Methods..." 4. Only publicMethod() is offered, not protectedMethod(), defaultMethod()
Created attachment 212843 [details] Eclipse project to reproduce the issue
For convenience, here's the code from the attached Eclipse project: ----------------------------- public class Abstract { public void publicMethod() { } protected void protectedMethod() { } void defaultMethod() { } private void privateMethod() { } } public class Wrapper extends Abstract { private Abstract delegate; public Wrapper(Abstract delegate) { this.delegate = delegate; } // Right-click here, choose "Source" > "Generate Delegate Methods..." // Among all applicable methods in Abstract, only publicMethod() is // offered, even if protectedMethod() and defaultMethod() would also // be applicable }
*** This bug has been marked as a duplicate of bug 144259 ***