return true; // All interfaces were found. } 這種方法讓程序員在寫的時(shí)候注明實(shí)現(xiàn)了哪些接口: this.implementsInterfaces = ['Composite', 'FormItem']; 在調(diào)用的時(shí)候使用implements方法來(lái)判斷是否實(shí)現(xiàn)了,理論上可行,很有可能寫上了實(shí)現(xiàn)了'Composite'接口,但是代碼里卻并沒(méi)有add方法!因此,我們需要檢驗(yàn)實(shí)現(xiàn)接口的...
www.dbjr.com.cn/article/238...htm 2025-5-29