0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PlantUML構文まとめ

Last updated at Posted at 2024-08-14

PlantUML構文まとめ

個人的にPlantUML構文をまとめる。随時更新予定
ぱっと検索して、記述方法を参照できることを目的とする。

基本構文

一行コメント

' 一行コメント (行末まで)

複数行コメント(ブロックコメント)

/' 
 複数行のコメント
 '/

他ファイル読み込み

' ↓は同階層にあるファイルを参照
!include xxx.pu

タイトル

title タイトル名

クラス図(Class diagram)

宣言

要素 説明
abstract abstract
abstract class "abstract class"
annotation annotation
circle circle
() circle_short_form
class class
class class_stereo <>
diamond diamond
<> diamond_short_form
entity entity
enum enum
exception exception
interface interface
metaclass metaclass
protocol protocol
stereotype stereotype
struct struct

可視性の定義

文字 可視性
- private
# protected
~ package private
+ public

クラス間の関係

記号 説明
-- 実践
.. 波線
: 関連名 関連名をつける
"1" -- "*" 多重度
<-- 関連
<.. 依存(Dependency)
< --
< ..
*-- 構成(Composition)
o-- 集約(Aggregation)
+-- 内部クラス(Inner Class)
()- ロリポップ

その他

記号 説明
Package 名前 {} パッケージ化
namespace 名前 {} 名前空間(Namespaces)
note top of クラス名 コメント クラスの上にノート
note bottom of クラス名 コメント クラスの下にノート
note left of クラス名 コメント クラスの左にノート
note right of クラス名 コメント クラスの右にノート
note 表示位置 クラス名::フィールド名 フィールドにノート
note 表示位置 クラス名::メソッド名 メソッドにノート
note 表示位置 on link 関連にノート
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?