Skip to content

Instantly share code, notes, and snippets.

@patarok
Created January 27, 2026 23:21
Show Gist options
  • Select an option

  • Save patarok/4429d9e03ff97973002d73dd40e24e94 to your computer and use it in GitHub Desktop.

Select an option

Save patarok/4429d9e03ff97973002d73dd40e24e94 to your computer and use it in GitHub Desktop.
PlantUML Fibel

🧾 PlantUML Kurz-Fibel (Beispielreferenz)

🔹 Grundstruktur

  • @startuml – Start der UML-Definition
  • @enduml – Ende der UML-Definition
  • ' Kommentar – Einzeiliger Kommentar
  • /' ... '/ – Block-Kommentar (nicht gerendert)

🔹 Pakete / Namensräume

package Name {
  ...
}
  • Gruppiert Klassen und Enums logisch

🔹 Klassen

class ClassName { }
abstract class ClassName
  • class – konkrete Klasse
  • abstract class – abstrakte Klasse

🔹 Attribute & Methoden

- field : Type
+ Method(param : Type) : ReturnType
  • - private
  • + public
  • : Typisierungsoperator
  • () Methode
  • ReturnType Rückgabewert

🔹 Sichtbarkeiten

  • + public
  • - private
  • # protected (nicht im Beispiel verwendet)

🔹 Vererbung (is-a / Generalization)

Child <|-- Parent
  • <|-- Generalisierung / Vererbung
  • Pfeil zeigt zur Basisklasse

🔹 Komposition (consists-of)

Owner *-- Part : "1"
  • *-- starke Besitzbeziehung
  • Lebenszyklus gebunden
  • Kardinalität in Anführungszeichen

🔹 Aggregation (has-a)

Whole o-- Part : "0..*"
  • o-- lose Besitzbeziehung
  • Objekte existieren unabhängig

🔹 Kardinalitäten

  • "1" – genau eins
  • "0..*" – null bis viele
  • "0..4" – begrenzte Anzahl

🔹 Enums

enum EnumName {
  VALUE1
  VALUE2
}
  • enum – Aufzählungstyp

🔹 Collections (Notation)

List<Type>
  • rein dokumentativ, keine Logik

🦖 UML-Merksatz

  • is-a → Vererbung (Generalization)
  • has-a → Aggregation
  • consists-of → Komposition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment