01 Model
Tab inserts two spaces. Esc, then Tab, leaves the editor.
Syntax
// comment
abstract class Animal {
# name: String
+ age: int = 0
+ {abstract} speak(): String
+ {static} count(): int
}
interface Comparable<T> {
+ compareTo(other: T): int
}
enum Color { RED, GREEN }
class Dog extends Animal implements Comparable<Dog>
class Bone // body is optional
| + - # ~ | public, private, protected, package |
|---|---|
| name: Type | attribute; generics like List<Book> |
| op(a: T): R | method with parameters and return type |
| {abstract} {static} | modifiers (italic / underlined) |
| A --|> B | inheritance (A extends B) |
| A ..|> B | realization (A implements B) |
| A -- B, A --> B | association, directed association |
| A o-- B | aggregation (A has B) |
| A *-- B | composition (A owns B) |
| A ..> B | dependency (A uses B) |
| A "1" *-- "0..*" B : label | multiplicities and a label |
Reversed arrows (<|--, --*, --o, <.., <--) also work. Classes used only in relations are created automatically and flagged.
02 Checks
03 Diagram
Wheel or pinch to zoom, drag to pan. Click a class to select it.
04 Code