有可能以这样的方式结束:
ServiceChild (class) extends (or only partial implements) Service and overrides sayHello
Service (interface) implements hello,goodbye
Hello (has a mixin HelloMixin) has method sayHello
Goodbye (has a mixin GoodbyeMixin) has method sayGoodbye
我已经尝试使用 ServiceChild 中的关注方法进行上述操作
public class ServiceChild extends ConcernOf<Service> implements Hello
{
@Override
public String sayHello() {
return "Rulle Pharfar";
}
}
然而,使用这种方法,java 只检测到 Hello 实现,而不是 Service 类中的其余内容。那么还有其他可行的方法吗?