PlantUMLを使ってシーケンス図を描く


[PlantUML](http://plantuml.sourceforge.net/index.html)

jarファイルをダウンロードして適当な場所に置く。

下ようなファイルを作成し、

```:goatprotocol.plantuml
@startuml
actor black
actor white

black -> white : message
note right: eat
white -> black : what was the message?
note left: eat
black -> white : what was the message?
note right: eat
@enduml
```

`$ java -jar plantuml.jar -tpng goatprotocol.plantuml`

![sequence diagram](http://f.cl.ly/items/0i172Q1u2E0n372l380w/Image%202013.03.08%202:33:19.png)

！！！

出力形式は色々選べて、Ascii出力もあるらしい。

`$ java -jar plantuml.jar -ttxt goatprotocol.plantuml`

```


        message
 --------------------->




                                  ,---!.
                                  |eat|_\
                                  `-----'






                                           what was the message?
                                           <---------------------







                                            ,---!.
                                            |eat|_\
                                            `-----'









                                                    what was the message?
                                                    --------------------->










                                                                                     ,---!.
                                                                                     |eat|_\
                                                                                     `-----'



                                                                                            |
                                                                                            |
                                                                                            |
                                                                                            |
                                                                                            |
                                                                                            |
                                                                                            |                       ,-.
                                                                                            |                       `-'
                                                                                                                    /|\
                                                                                                                     |
                                                                                                                    / \
                                                                                                                   black
                                                                                                                    |
                                                                                                                    |






                                                                                                                         black                         ,-.
                                                                                                                          ,-.                          `-'
                                                                                                                          `-'                          /|\
                                                                                                                          /|\                           |
                                                                                                                           |                           / \
                                                                                                                          / \                         white








                                                                                                                                                                                   white
                                                                                                                                                                                    ,-.
                                                                                                                                                                                    `-'
                                                                                                                                                                                    /|\
                                                                                                                                                                                     |
                                                                                                                                                                                    / \
                                                                                                                                                                                                                                           message
                                                                                                                                                                                                                                    --------------------->




                                                                                                                                                                                                                                                                     ,---!.
                                                                                                                                                                                                                                                                     |eat|_\
                                                                                                                                                                                                                                                                     `-----'






                                                                                                                                                                                                                                                                             what was the message?
                                                                                                                                                                                                                                                                             <---------------------







                                                                                                                                                                                                                                                                              ,---!.
                                                                                                                                                                                                                                                                              |eat|_\
                                                                                                                                                                                                                                                                              `-----'









                                                                                                                                                                                                                                                                                       what was the message?
                                                                                                                                                                                                                                                                                       --------------------->










                                                                                                                                                                                                                                                                                                                        ,---!.
                                                                                                                                                                                                                                                                                                                        |eat|_\
                                                                                                                                                                                                                                                                                                                        `-----'
```
激しく残念。