我在我们的代码中看到了很多这种设计模式。你觉得合理吗?
interface A {
void doSmth();
}
interface B extends A {
}
class C implements A {
A a;
public C(A a) {
this.a = a;
}
@Override
public void doSmth() {
}
}
class D implements B {
A a;
public D() {
a = new C(this);
}
@Override
public void doSmth() {
a.doSmth();
}
}