Mixin
Mixin copied to clipboard
Enable accessors to return a (potentially mixin added) supertype of the targetted field
When dealing with fields whose type is a private class, it would be useful to be able to target those fields with an accessor whose return type is a supertype of the field type.
For instance
public class Target {
private class Inner {}
private Inner inner;
}
@Mixin(Target.class)
interface TargetInnerAccessor {
interface Inner { /* some accessors */ }
@Accessor Inner getInner();
}
Having support for this with shadowing would also be nice.