Thursday, June 1, 2017

PlantUML Class Diagram

I made a class diagram with PlantUML followed by the previou sequence diagram.

' Write comments after single quotaion mark.

@startuml

' Color Setting
skinparam classBorderColor black
skinparam classArrowColor black
skinparam noteBorderColor black
skinparam classAttributeIconSize 0

' Class Definition
class ClassA {
  - privateMember : Integer
  + publicMember : Integer
  # protectedMember : Integer
  ~ packageMember : Integer
  + method() : void
  + {static} staticMethod() : void
  + {abstract} abstractMethod() : void
}
' Note (For Class)
note top of ClassA: Note
note right of ClassA
  Note
end note

' Interface
interface Interface
ClassA ..|> Interface
' Note(Linkに対して)
note on link: Note

' Abstract Class
abstract AbstractClass
ClassA --|> AbstractClass

' Association
ClassA -- ClassB

' Composition
ClassA --* ClassC

' Aggregation
class ClassD
ClassA --o ClassD

' Dependency
class ClassE
ClassA ..> ClassE

@enduml

Generated Diagram

http://www.plantuml.com/plantuml/png/XLBBIiD05DtdAowuy4N5jGj1MnU2kl4B9fCn3ardmcHKV5H80gBetiVEZLR5AheGeTIF6OhT-GlUIL9R9M0Mayavvzuvzqp6mIIl9hqsAQx79duooPlT9yycVJ09VjwRj6FI8xjQwjQoSRlNFJFnGxzrqVzuDl6bIKuTVCQXV_BIRptssbTELESY98eqW0OaYXQbyfYgoa0gS0D2wty52qh9dN9UICt-hzTQSNTBisKgnJhVOp1h3TaPqZkJlAEdp-wTascXcbN0lWDGWL3nRQBPAckuJC4SB0lDVAQGcuPmomquBQ76i0njKSsy4lOGGhH8_FAc3QOtfJSnYV2sv5w6xKUQQ4wRaBzNooJ4ZRGYL3TXiFihQ-B4QsZhgtESZOXtr7lgclZSn3TVdHF79WbQXY0tYWpcCdrEAEvlwY65XsOS4rvs1JPEEuRQ89GvVB0RmOfOPsOEvaVG7qihNDHB7Ka10NA55onOAERBdJY3SN_m72wEgrJmkD-CRH55adBCKegXCE-tQFcgR8Gouh_vgLnGpHhulc9-tc3ahwaDrNA0eBh6Gio92RexAbuQHZ9V8Dy0

No comments:

Post a Comment