In Java, you can do the following :
public interface IEngine{}
public interface ICoolEngine extends IEngine{}
public interface Car
{
IEngine getEngine();
}
public interface ICoolCar extends ICar
{
@Override
ICoolEngine getEngine();
}
While this nicely solves a problem I've been grappling with, something about it "feels" wrong.
Am I committing some nasty design faux pas here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…