Skip to content

Glossary: Software Design Patterns in Java

Constructor injection

Passing an object its dependencies through its constructor, to keep for its whole life. `OrderLog` receives its repo, clock and notifier this way.

Where the book teaches it

Related terms

Dependency injectionDependency