JiveJdon Community Forums
在线150人   首页   主题总表   培训咨询   精华   查搜   注册    登陆
首页 » 论坛 » 设计模式、框架和架构
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表
???en_US.forumThreadNext.name??? 下一主题
Go 总共有 2 回复 / 1
 发表新帖子   回复该主题贴
曙光

悄悄话
发表文章: 7
注册时间: 2002年09月13日 16:44
这个是否是Composite 模式? 2002年10月14日 14:58 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
标签列表
我觉得是Composoite模式,不是理解是否正确?
又觉得像Factory?

public interface Initable {
public void init();
}

public class BaseInitable implements Initable {
public void init() {
//init code
}
}

public interface Service extends Initable {
public Service getService(String name);
}

public class BaseService extends BaseInitable implements Service {
public Service getService(String name) {
//return service instance
}
}
iceant

悄悄话
发表文章: 462
注册时间: 2002年10月13日 22:32
Re: 这个是否是Composite 模式? 2002年10月14日 15:24 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
经常这样使用,但是好像不属于 23 个 Design Pattern 中
banq

悄悄话
发表文章: 9313
注册时间: 2002年08月03日 17:08
Re: 这个是否是Composite 模式? 2002年10月14日 20:30 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
不能算composite composite模式需要以树形结构组合起来。

算是Adapter吧。
这个主题有 2 回复 / 1Go
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表    返回页首返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache 缓存 DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Seam Spring Struts
正在读取,请等待...
google yahoo 新浪ViVi 365Key网摘 天极网摘 CSDN网摘 添加到百度搜藏 POCO网摘 博采网摘
查询本论坛内 回复超过的热门帖子
     回复该主题贴
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

手机阅读 add to google add to yahoo
解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-08 jdon.com
anti spam