PlantUML is een open-sourcetool waarmee gebruikers diagrammen kunnen maken vanuit eenvoudige tekstbeschrijvingen.
Basis diagramblokken
@startuml
User -> Service : Authenticate
Service --> User : Token
@enduml
Klassendiagrammen (Class Diagrams)
Klasse-attributen & zichtbaarheid
@startuml
class BankAccount {
+String owner
#Integer accountNumber
-Decimal balance
~String branchCode
+deposit(amount : Decimal) : void
-calculateInterest() : Decimal
{static} String bankName
{abstract} getAccountType() : String
}
@enduml
| Modificator | Zichtbaarheid |
|---|---|
+ |
Publiek (Public) |
- |
Privé (Private) |
# |
Beveiligd (Protected) |
~ |
Pakket-privé (Package Private) |
Klasserelaties (Class Relationships)
@startuml
Animal <|-- Dog : Extension / Inheritance
Car *-- Engine : Composition
College o-- Student : Aggregation
Driver ..> Car : Dependency
Interface <|.. Impl : Implementation (Dotted)
@enduml
| Syntaxis | Relatie | Betekenis |
|---|---|---|
| `< | --` | Generalisatie / Overerving |
*-- |
Compositie | Kind kan niet zonder ouder bestaan |
o-- |
Aggregatie | Kind kan onafhankelijk bestaan |
| `< | ..` | Realisatie |
..> |
Afhankelijkheid | Tijdelijk gebruik |
Notities & annotaties
@startuml
class Customer
note left of Customer : Customer identity record
note "Floating standalone note" as N1
@enduml
Activiteitsdiagrammen (Activity Diagrams)
@startuml
start
:Receive Payment;
if (Verified?) then (yes)
:Fulfill Order;
:Send Email;
else (no)
:Notify Customer;
endif
stop
@enduml