Код: Выделить всё
interface interfaceA {
VariationA getVariation();
}
interface interfaceB {
VariationB getVariation();
}
public class classC{
private interfaceA interfaceImpl = new interfaceAImpl();
}
public class classD{
private interfaceB interfaceImpl = new interfaceBImpl();
}
P.S.
У меня есть Доступны возможности Lombok и Spring Framework.
Подробнее здесь: https://stackoverflow.com/questions/787 ... interfaces
Мобильная версия