PlantUMLでクラス図を描くためのサンプルコードです。
起動バッチ作成などはこちらの記事。
'クラス図_sample.txt
' メモ
'http://plantuml.com/class-diagram
'
@startuml
skinparam {
defaultFontName メイリオ
NoteBorderColor Black
NoteBackgroundColor White
}
skinparam class {
BackgroundColor LightYellow
ArrowColor Black
BorderColor Black
}
title クラス図サンプル
note as N1
・ノート
end note
abstract class AbstractReport{
-entityList : List<T>
+{abstract} getEntity()
#{abstract} createReport()
}
note left of AbstractReport
スーパークラス(抽象クラス)
<font color="red">HTMLタグが使えるよ</font>
end note
class ReportAAA {
+ getEntity()
# createReport()
}
class ReportBBB {
+ getEntity()
# createReport()
}
class AttendantClass {
+AttendantClass()
+compareTo()
}
class entityAAA{
}
'パッケージで分ける場合はこのようにする(色つき)
package xxx.yyy.zzzzz #FFD0D0 {
class entityBBB{
}
}
note right of entityBBB #lightcyan
Entityクラス:
コメント、コメント、コメント。
end note
AbstractReport .right.> AttendantClass
AbstractReport <|-- ReportAAA : 継承
AbstractReport <|-- ReportBBB : 継承
ReportAAA "1" *-- "*" entityAAA
ReportBBB "1" *-- "*" entityBBB
@enduml
タグ:UML