无事水|

Nolca

园龄:6年9个月粉丝:12关注:9

根据项目,逆向自动生成UML图表。简单理解UML类定义

1. understand

image
保存成.svg,用浏览器打开
全选,然后粘贴至vscode(任一的支持正则的文本编辑器)
替换: +\n + -\n -
最后在markdown的mermaid中手动组装,完成类图

2. 类间关系

interfaceA extends interfaceB:接口继承接口,这是可以的
抽象类<<Abstract>>内可具体写方法。
<<Interface>>是特殊的抽象类,不能写方法。
接口内可有已有类的方法,抽象层

泛化
实现
组合
聚合
1..*
关联
1..*
*
(双向)关联
1
*
依赖
Animal
-lung
+breathe()
Human
-Mom momInstance
-Boss bossInstance
-Heart heart
+earn(Money m)
«interface»
ILanguage
-brain
+talk()
+hear()
+write()
Heart
-Human host
Crowd
-List<Human> members
Boss
Mom
-Human childInstance
Money
-deposit 存款
+exchange()
继承 extends
implements
强组合contains a
整体和个体不能独立存在
生命周期必须相同(级联)
弱拥有has a
层级:整体>个体
下属要记住
互相记住
Human离开Money
就无法通过编译
eg:Human内
调用了Money.exchange()

关键字

接口:无后缀(一层接口),Mapper(二层接口)
具体实现:Impl
依赖:修饰符@Data
组合:Controller *-- ServiceImpl

本文作者:Nolca

本文链接:https://www.cnblogs.com/nolca/p/17854066.html

版权声明:本作品采用 收益分享revenue sharing 许可协议进行许可。

posted @   Nolca  阅读(80)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 ⏩intro 山姆精
  2. 2 🎸吉他 马叉
  3. 3 ☁升调 山姆精
  4. 4 🐦Flutter Virtual Riot/Madi
  5. 5 🎶纯律 山姆精
  6. 6 👻yeah~Color Bass! VR
🎸吉他 - 马叉
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.