美文网首页
PlantUML类图的写法

PlantUML类图的写法

作者: shuaidong | 来源:发表于2018-05-09 00:06 被阅读0次

案例

@startuml

skinparam BackGroundColor #3c3f41

skinparam class {
    BorderColor #cbd5d6
    ArrowColor #589df6
    BackGroundColor #645e4d
}



title class
scale 1.1
/'组合关系(composition)'/
class Human {
    - Head mHead;
    - Heart mHeart;
    ..
    - CreditCard mCard;
    --
    + void travel(Vehicle vehicle);
}

Human *-up- Head : contains >
Human *-up- Heart : contains >

/'聚合关系(aggregation)'/
Human o-left- CreditCard : owns >

/'依赖关系(dependency)'/
Human .down.> Vehicle : dependent

/'关联关系(association'/
Human -down-> Company : associate

/'继承关系(extention)'/
interface IProgram {
    + void program();
}
class Programmer {
    + void program();
}
Programmer -left-|> Human : extend
Programmer .up.|> IProgram : implement
@enduml

上述的类图


image.png

相关文章

  • PlanUML教程

    PlantUML类图的写法 PlantUML用下面的符号来表示类之间的关系:类之间的关系 类关联关系英文名称pla...

  • PlantUML类图的写法

    案例 上述的类图

  • 类图的6大关系详解

    类图 以下类图使用PlantUML绘制,更多语法及使用请参考:http://plantuml.com/。 泛化关系...

  • 2021-07-06

    类图 1、https://plantuml.com/zh/starting[https://plantuml.co...

  • PlantUML 简明教程

    PlantUML 简介 PlantUML 是一个开源项目,支持快速绘制时序图、用例图、类图、活动图、组件图、状态图...

  • UML

    参考 plantuml 类图 类图常见的关系: 继承(Inheritance),实现关系(Realization/...

  • Mac环境下在VSCode中使用PlantUML

    PlantUML介绍 PlantUML 可以用来画类图和流程图,类似MarkDown语法那样简单实用。 第一步:安...

  • intellij idea 工具集

    Intellij IDEA中安装&使用PlantUML画时序图、类图等 intellij 2018.2.5 注册...

  • android studio使用 plantUML插件绘制UML

    android studio使用plantUML插件绘制UML类图 未安装Graphviz Graphviz介绍D...

  • 用PlantUML画UML类图KafkaProducer

    利用PlantUML可以非常方便的画各种UML图,下面是我画的KafkaProducer的类图。 最方便的是这个图...

网友评论

      本文标题:PlantUML类图的写法

      本文链接:https://www.haomeiwen.com/subject/tnpgrftx.html