app.aug diagrams
Function and constructor middleware
Project overview · Compiled explanation
Class interactions
Greeter
Mermaid source
flowchart LR
n0["Greeter"]
n1["IGreeter"]
n2["Console"]
n3["Audit"]
n4["Logger"]
n0 -->|"implements"| n1
n0 -->|"depends on"| n2
n0 -->|"intercepted by"| n3
n0 -->|"depends on _logger"| n4
IGreeter
Mermaid source
flowchart LR
n0["IGreeter"]
n1["Console"]
n2["Logger"]
n0 -->|"depends on"| n1
n0 -->|"depends on"| n2
describe
Mermaid source
flowchart LR
n0["describe"]
n1["Console"]
n2["AddOne"]
n3["Audit"]
n4["Positive"]
n5["Logger"]
n0 -->|"calls write; depends on"| n1
n0 -->|"intercepted by"| n2
n0 -->|"intercepted by"| n3
n0 -->|"intercepted by"| n4
n0 -->|"depends on"| n5
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.
describe
Prints a number and returns its label.
It takes x as an integer and label as a string. It gets logger (Logger) and console (Console) from dependency injection.
It can call Console.write. Failures can raise ValidationError.
Layers run in the declared order. Call Audit.around. Call Positive.around. Map x to y. Call AddOne.around. Map x to y.
Mermaid source
sequenceDiagram
participant p0 as describe
participant p1 as console: Console
Note over p0: Applied layers: Audit, Positive, AddOne; may stop or<br/>change delegation; see specification
p0->>p1: write(value=x) · interface dispatch
Note over p0: Return label; required cleanup runs before exit
Note over p0: May leave with checked errors: ValidationError
IGreeter.greet
It gets logger (Logger) and console (Console) from dependency injection.
It returns string. It can call Console.write.
Interface contract; implementation selected at runtime. Explanation.
Greeter constructor
Construction stores its inputs; startup is visible in the greet call. It implements IGreeter.
It takes name as a string, kept read-only. It gets _logger (Logger), kept read-only and private as _logger from dependency injection.
Receive fields: injected _logger, name. Explanation.
Greeter.greet
Method annotations wrap each method invocation separately.
It gets logger (Logger) and console (Console) from dependency injection.
It can call Console.write.
Layers run in the declared order. Call Audit.around.
Applied layers: Audit; may stop or change delegation; see specification. Return "Hello, " + name + "!"; required cleanup runs before exit. Explanation.