Skip to content

greeter.aug diagrams ​

Labeled calls and injection

Project overview · Compiled explanation

Class interactions ​

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

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 ​

It implements IGreeter.

It takes x as an integer, kept read-only. It gets logger (Logger), kept read-only from dependency injection.

Receive fields: injected logger, x. Explanation.

Greeter.greet ​

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 ​

It takes name as a string. 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