Topic: 模板方法 |
Print this page |
1.模板方法 | Copy to clipboard |
Posted by: xiaopan Posted on: 2003-03-24 13:31 所谓模板方法就是抽象类中的某个非抽象方法,在该方法体中有调用该类的抽象方法,我们把这样的方法叫做模板方法,目的是为了该类的子类具有统一的界面. |
2.Re:模板方法 [Re: xiaopan] | Copy to clipboard |
Posted by: snowbug Posted on: 2003-03-25 06:53 Shouldn't this be moved to the UML board? |
3.Re:模板方法 [Re: xiaopan] | Copy to clipboard |
Posted by: bujinwang Posted on: 2003-03-26 12:34 This belongs to "Design Patterns". GoF got a pattern called "Template Method". |
4.Re:模板方法 [Re: xiaopan] | Copy to clipboard |
Posted by: jiangns3000 Posted on: 2003-03-26 22:14 可是在子类中该方法可以被overriding,这与其它abstract方法又有何不同? 难道抽象类本身(或)接口不是其子类(或实现接口的类)的一种统一的界 面?理由不充分。 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |