Generics and Mermaid-compatible syntax
A generic repository written in Mermaid classDiagram shorthand — tilde-generics, single-line members, and member classifiers — all rendered with standard-correct adornments, so a Mermaid snippet migrates in one line.
For the developer migrating from Mermaid
What this shows
The same diagram a developer would paste from a Mermaid classDiagram, rendered with Schematex's standard-correct adornments and layered layout.
Tilde-generics convert to angle brackets: List~T~ → List<T>, and they nest — Map~String,List~int~~ → Map<String,List<int>>. The generic also works on the class name itself (class Repository~T~ → Repository<T>).
Single-line members append to a class: CrudService : +repo : Repository~User~ adds an attribute, and CrudService : <<service>> sets the stereotype — no { … } block required.
Member classifiers are the Mermaid suffixes: flush()* marks an abstract operation (rendered italic) and count$ a static member (rendered underlined). Return types may be space-separated (findAll() List~T~) the way Mermaid writes them. A lone leading ~ is still the package-visibility glyph, so the two never collide.