Community
Participate
Working Groups
Something like that: interface Foo { def void foo() } interface Bar extends Foo { def void bar() } class Client implements Bar { @Delegate(Bar -> false) // false means without implementing methods from super types Bar delegate } In this case only implementation for bar method will be generated.
If you implement foo in Client yourself, that should already do the trick, right?
What if Client extends ClientBase that implements Foo interface? Then Client looks like: class Client extends ClientBase implements Bar { @Delegate Bar delegate // just to avoid calling delegate#foo override foo() { super.foo } } It is fine if Foo has only one method but it gets tedious if Foo has a bunch of methods.
Inheriting some implementations and deleting to others is a very error-prone approach and confusing. We had this situation just recently in the IDEA tests. I don't think we should enhance Delegate with more special semantics.
That should have been "delegating" not "deleting", of course.