设计模式
2021-06-05 00:38:17 13 举报
iii
作者其他创作
大纲/内容
享元模式
命令模式
责任链模式
Context
+ algorithm():void- setStratege(Stratege):voide
UnsharedConcrateFlyWeight
+ operation():void
依赖
preRequest()realSubject->request()afterRequest()
ProductB
+ method()
AbstractFactory
+ createProduct(Class):Product
Factory
SimpleFactory
+ static createProduct(Class):Product
FactoryB
ProductA
HandlerA
+ handleRequest():void
Client
FlyWeightFactory
+ getFlyWeight(key)
合成
Invoker
+ setCommand():void+ action():void
Save Command
+ execute():void
Product
聚合
strategy->algorithm()
RealSubject
+ request():void
Open Command
Subject
ConcrateFlyWeight
Client通过getInstance()访问
泛化
策略模式
Print Command
FactoryA
实现
代理模式
关联
简单工厂模式
工厂方法模式
create
单例模式
HandlerB
realSubject
AbstractRequestHandler
+ nextHandler:AbstractRequestHandler
抽象工厂模式
Command
StrategeB
+ algorithm():void
Strategy
FlyWeight
Proxy
+ afterRequest():void+ preRequest():void+ request():void
Singleton
- static final Singleton singleton = new Singleton()- Singleton()+ static Singleton getInstance()
StrategyA
0 条评论
下一页