UML
2021-11-14 17:31:50 11 举报
UML
作者其他创作
大纲/内容
ConcreteCompositeFlyweight
- files:HashMap- flyweightFlyweight
+ ConcreteCompositeFlyweight+ add:void+ operation:void
ScheduledThreadPoolExecutor
单纯享元模式的机构
ConcreteComponent
+ sampleOperation:void
后台
ConcreteImplementorB
+ operationImp:void
interface接口名
属性清单
方法清单
《interface》Executor
+execute(Runnable command) :void
Flyweights
interfaceRunnable
+run():void
return Class
Subject
+ request:void
impl
Adaptee
+ attribute1:type = defaultValue+ attribute2:type- attribute3:type
+ operation1(params):returnType- operation2(params)
Adapter
- adaptee:Adaptee
+Adapter+ sampleOperation1:void+ sampleOperation2:void
Looper
类适配器模式
ConcreteCreator1
+ fractoryA:ProductA+ fractoryB:ProductB
+ sampleOperation1:void
Camera
+ turnOn():void+ turnOff():void+ rotate():void
Object 2
enqueueMessage()next()quit()removeAllFutureMessagesLocked()
Light
+ turnOn():void+ turnOff():void+ changeBulb():void
MessageQueue
Object 7
返回弹出提示(app)
Client
- factory:FlyweightFactory
+ main:void
quit()
Object 1
ConcreteFlyweight
- intrinsicState:Character
+ ConcreteFlyweight+ operation:void
Sensor
+ activate():void+ deactivate():void+ trigger():void
复合享元模式的机构
getClassLoader()
GC Roots
ConcreteBuilder
+ builderPart1:void+ builderPart2:void+ retrieveResult:Product
类名
ConcreteProductB2
+ ConcreteProductB2
Object 5
ThreadPoolExecutor
DexPathList
HashMap(ThreadLocal,Looper)
ActivityThread
interfaceComponent
Runnable callback;obtain()recycle()recycleUnchecked()
- operation3()
加载失败
Leaf
代理模式
一般关联关系(双向)
接口继承
MessageMessageMessageMessageMessageMessageMessageMessageMessageMessage
一般关联关系(单向)
短信发送
SecurityFacade
- camera1:Camera- camera2:Camera- light1:Light- light2:Light- light3:Light- sensor:Sensor- alarm:Alarm
+ activate():void+ deactivate():void
interfaceTarget
+ sampleOperation1:void+ sampleOperation2:void
《interface》ScheduledExecutorService
Flyweight
+ operation:void
Create
ConcreteCreator2
findClass()
Creator
+ factory:Product
抽象工厂
ConcreteProduct1
+ ConcreteProduct1
ConcreteProductA2
+ ConcreteProductA2
跳转大师订单页面可以查看订单(app)
interfaceProduct
loop()
interfaceCreator
+ fractory:Product
Object 6
《interface》Future
ConcreteProduct
+ ConcreteProduct
客户端支付
通知等待3天
interfaceProductB
构建者模式
依赖关系
Composite
结果(附上url)
类名正体字:具体类类名斜体字:抽象类(+):public(-):private(#):protected下划线:静态方法
发送短信
ConcreteProductB1
+ ConcreteProductB1
return ClassLoaer
Alarm
+ activate():void+ deactivate():void+ ring():void+ stopRing():void
微信客服
类继承
校验订单
+ sampleOperation2:void
手机号等信息输入(H5)
findLoadedClass()
+ creator1:Creator+ creator2:Creator- prod1:Product- pord2:Product
Builder
Handler
RealSubject
+ RealSubject+ request:void
Product
+ Product
Creates
+ operation1(params):returnType- operation2(params)- operation3()
《interface》ExecutorService
Object 4
interfaceProductA
对象适配器模式
(0...1)--零个或者一个实例(0...*)或者(*)--对实例的数目没有限制(可以是0)(1)--只有一个实例(1...*)--至少有一个实例(n...m)--n~m个实例
send()
ConcreteProduct2
+ ConcreteProduct2
H5回调付费点
Looper.prepareMainLooper();
《interface》RunnableFuture
parent.loadClass()/findBootstrapClassOrNull()
FlyweightFactory
+ files:HashMap
+ FlyweightFactory- factory:Flyweight- checkFlyweight:void
FutureTask
-callable:Callable -outcome:Object-runner:Thread-waiters:WaitNode
聚合关系
loadClass()
Implementor
AbstractExecutorService
大师订单查看结果(浏览器、app)
Abstraction
ConcreteProductA1
+ ConcreteProductA1
+ main():void
简单工厂
合成关系
选择名字
+ fractoryA:ProductB+ fractoryA:ProductB
-security:SecurityFacade
ConcreteImplementorA
Decorator
- component:Component
+ Decorator+ Decorator+ sampleOperation:void
ConcreteDecorator
工厂方法模式
Looper.loop();
打开app
大师起名(app)
Director
+ Director+ construct:void
大师套餐详情页面(H5)
builder
prepare()
ContextWrapper
Object 3
composite
RefinedAbstraction
获取class的实体
ProxySubject
- realSubject:RealSubject
+ ProxySubject+ request:void- preRequest:void- postRequest:void
ClassLoader
提交
0...*
0 条评论
回复 删除
下一页