今天我在代码中发现了什么似乎是实现父类已经继承的接口的子类。实现通用接口的父类和子类重复
我可以知道这是否有任何不良副作用或意图,因为我正在努力将其从儿童课堂中删除,因为我认为这可能是一个意外的错误,或者我可能错过了什么?
在子类:
public class ProductServiceBean
extends GenericSessionBean
implements javax.ejb.SessionBean
在父类:
// Compiled from GenericSessionBean.java (version 1.2 : 46.0, super bit)
public abstract class weblogic.ejb.GenericSessionBean
extends weblogic.ejb.GenericEnterpriseBean
implements javax.ejb.SessionBean
注意,在这两个孩子和家长,该班就实现javax.ejb.SessionBean
。
也在这里回答:http://stackoverflow.com/questions/5668429/why-would-both-a-parent-and-child-class-implement-the-same-interface。 –