Skip to content

app/greeter.aug diagrams ​

Hello world with dependencies

Project overview · Compiled explanation

Class interactions ​

100%
Mermaid source
flowchart TD
    n0["Greeter"]
    n1["IGreeter"]
    n2["Console"]
    n3["Logger"]
    n0 -->|"implements"| n1
    n0 -->|"depends on"| n2
    n0 -->|"calls log; depends on logger"| n3
    n1 -->|"depends on"| n2

Sequences ​

Call arrows identify checked targets; loop and branch frames determine when they run. Open that target’s module to follow its implementation. Branches describe alternatives; loops describe repeated work. Native calls and interface dispatch stop at their declared contracts. Exit notes end that path; enclosing recovery and cleanup remain visible.

Greeter constructor ​

Welcomes a user through the configured logger. It implements IGreeter.

The logger dependency is injected as Logger and stored read-only (the application logger, injected when resolved).

Receive fields: injected logger. Explanation.

Greeter.greet ​

Prints a personalized greeting.

It takes name as a string. It gets console (Console) from dependency injection.

It can call Console.write.

100%
Mermaid source
sequenceDiagram
    participant p0 as Greeter.greet
    participant p1 as logger: Logger
    p0->>p1: log(message=”Hello, ” + name + ”!”) · interface dispatch

IGreeter.greet ​

Prints a personalized greeting.

It takes name as a string (the user to welcome). It gets console (Console) from dependency injection.

It can call Console.write.

Interface contract; implementation selected at runtime. Explanation.

Called contracts ​

Last updated:

The world runs on language