The injection Reference Manual

This is the injection Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:28:14 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 injection

Dependency injection for Common Lisp

Author

Matthew Carter <>

License

GPLv3

Version

0.1

Dependency

cl-yaml (system).

Source

injection.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 injection/src/package

Source

injection.asd.

Parent Component

injection (system).

Child Component

package.lisp (file).


3.2 injection/src/util

Dependency

src/package (module).

Source

injection.asd.

Parent Component

injection (system).

Child Component

generic.lisp (file).


3.3 injection/src/classes

Dependency

src/util (module).

Source

injection.asd.

Parent Component

injection (system).

Child Components

3.4 injection/src/app

Dependency

src/classes (module).

Source

injection.asd.

Parent Component

injection (system).

Child Component

main.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 injection/injection.asd

Source

injection.asd.

Parent Component

injection (system).

ASDF Systems

injection.

Packages

injection-asd.


4.1.2 injection/src/package/package.lisp

Source

injection.asd.

Parent Component

src/package (module).

Packages

injection.


4.1.3 injection/src/util/generic.lisp

Source

injection.asd.

Parent Component

src/util (module).


4.1.4 injection/src/classes/Container.lisp

Dependency

file-loader.lisp (file).

Source

injection.asd.

Parent Component

src/classes (module).

Public Interface
Internals

4.1.5 injection/src/classes/File-Loader.lisp

Source

injection.asd.

Parent Component

src/classes (module).

Internals

4.1.6 injection/src/app/main.lisp

Source

injection.asd.

Parent Component

src/app (module).


5 Packages

Packages are listed by definition order.


5.1 injection

Source

package.lisp.

Use List
  • cl-yaml.
  • common-lisp.
Public Interface
Internals

5.2 injection-asd

Source

injection.asd.

Use List
  • asdf/interface.
  • common-lisp.

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *container-singleton*
Package

injection.

Source

container.lisp.


6.1.2 Ordinary functions

Function: container-factory (file-name &key singleton)

Return an instance of CONTAINER class loaded up with FILE-NAME. If SINGLETON is t, also sets the *container-singleton* to the last loaded file, so the shortcut functions can be used to directly access the yml elements.

Package

injection.

Source

container.lisp.

Function: get-parameter (name)

When the *container-singleton* is set, returns the service NAME.

Package

injection.

Source

container.lisp.

Function: get-service (name)

When the *container-singleton* is set, returns the service NAME.

Package

injection.

Source

container.lisp.


6.1.3 Generic functions

Generic Function: container-get-parameter (container name)

Get a specific parameter NAME from CONTAINER.PARAMETERS.

Package

injection.

Source

container.lisp.

Methods
Method: container-get-parameter ((container container) name)
Generic Function: container-get-service (container name)

Get a specific service NAME (class instance) from CONTAINER.SERVICES.

Package

injection.

Source

container.lisp.

Methods
Method: container-get-service ((container container) name)

6.2 Internals


6.2.1 Ordinary functions

Function: file-loader-factory (file-name)

Return an initialized FILE-LOADER class loaded up with FILE-NAME.

Package

injection.

Source

file-loader.lisp.


6.2.2 Generic functions

Generic Function: container-expand-services (container arguments)

Look for arguments with the ’@’ symbol and expand.

Package

injection.

Source

container.lisp.

Methods
Method: container-expand-services ((container container) arguments)

If we have any arguments that begin with an ’@’ symbol, we want to expand into the equivalent call to (Container-Get-Service container name).

Generic Function: container-instantiate-services (container)

Instantiate each service (including dependent ones).

Package

injection.

Source

container.lisp.

Methods
Method: container-instantiate-services ((container container))
Generic Function: container-load-file (container file-name)

Load the YAML ’FILE-NAME’ into the CONTAINER.SERVICES and CONTAINER.PARAMETERS.

Package

injection.

Source

container.lisp.

Methods
Method: container-load-file ((container container) file-name)
Generic Reader: content (object)
Package

injection.

Methods
Reader Method: content ((file-loader file-loader))

automatically generated reader method

Source

file-loader.lisp.

Target Slot

content.

Generic Writer: (setf content) (object)
Package

injection.

Methods
Writer Method: (setf content) ((file-loader file-loader))

automatically generated writer method

Source

file-loader.lisp.

Target Slot

content.

Generic Reader: file-name (object)
Package

injection.

Methods
Reader Method: file-name ((file-loader file-loader))

automatically generated reader method

Source

file-loader.lisp.

Target Slot

name.

Generic Writer: (setf file-name) (object)
Package

injection.

Methods
Writer Method: (setf file-name) ((file-loader file-loader))

automatically generated writer method

Source

file-loader.lisp.

Target Slot

name.

Generic Reader: instances (object)
Package

injection.

Methods
Reader Method: instances ((container container))

automatically generated reader method

Source

container.lisp.

Target Slot

instances.

Generic Writer: (setf instances) (object)
Package

injection.

Methods
Writer Method: (setf instances) ((container container))

automatically generated writer method

Source

container.lisp.

Target Slot

instances.

Generic Function: load-content (file-loader)

Load FILE-LOADER.CONTENT based on FILE-LOADER.FILE-NAME.

Package

injection.

Source

file-loader.lisp.

Methods
Method: load-content ((file file-loader))
Generic Reader: parameters (object)
Package

injection.

Methods
Reader Method: parameters ((container container))

automatically generated reader method

Source

container.lisp.

Target Slot

parameters.

Generic Writer: (setf parameters) (object)
Package

injection.

Methods
Writer Method: (setf parameters) ((container container))

automatically generated writer method

Source

container.lisp.

Target Slot

parameters.

Generic Function: parse-yaml (file-loader)

Parse FILE-LOADER.CONTENT into FILE-LOADER.YAML.

Package

injection.

Source

file-loader.lisp.

Methods
Method: parse-yaml ((file file-loader))
Generic Reader: services (object)
Package

injection.

Methods
Reader Method: services ((container container))

automatically generated reader method

Source

container.lisp.

Target Slot

services.

Generic Writer: (setf services) (object)
Package

injection.

Methods
Writer Method: (setf services) ((container container))

automatically generated writer method

Source

container.lisp.

Target Slot

services.

Generic Reader: yaml (object)
Package

injection.

Methods
Reader Method: yaml ((file-loader file-loader))

automatically generated reader method

Source

file-loader.lisp.

Target Slot

yaml.

Generic Writer: (setf yaml) (object)
Package

injection.

Methods
Writer Method: (setf yaml) ((file-loader file-loader))

automatically generated writer method

Source

file-loader.lisp.

Target Slot

yaml.


6.2.3 Classes

Class: container
Package

injection.

Source

container.lisp.

Direct methods
Direct slots
Slot: services
Initargs

:file-name

Readers

services.

Writers

(setf services).

Slot: parameters
Initargs

:parameters

Readers

parameters.

Writers

(setf parameters).

Slot: instances
Initform

(make-hash-table :test (function equal))

Initargs

:instances

Readers

instances.

Writers

(setf instances).

Class: file-loader
Package

injection.

Source

file-loader.lisp.

Direct methods
Direct slots
Slot: name
Initform

""

Initargs

:file-name

Readers

file-name.

Writers

(setf file-name).

Slot: content
Initargs

:content

Readers

content.

Writers

(setf content).

Slot: yaml
Initargs

:yaml

Readers

yaml.

Writers

(setf yaml).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   F   G   I   L   M   P   S   Y  
Index Entry  Section

(
(setf content): Private generic functions
(setf content): Private generic functions
(setf file-name): Private generic functions
(setf file-name): Private generic functions
(setf instances): Private generic functions
(setf instances): Private generic functions
(setf parameters): Private generic functions
(setf parameters): Private generic functions
(setf services): Private generic functions
(setf services): Private generic functions
(setf yaml): Private generic functions
(setf yaml): Private generic functions

C
container-expand-services: Private generic functions
container-expand-services: Private generic functions
container-factory: Public ordinary functions
container-get-parameter: Public generic functions
container-get-parameter: Public generic functions
container-get-service: Public generic functions
container-get-service: Public generic functions
container-instantiate-services: Private generic functions
container-instantiate-services: Private generic functions
container-load-file: Private generic functions
container-load-file: Private generic functions
content: Private generic functions
content: Private generic functions

F
file-loader-factory: Private ordinary functions
file-name: Private generic functions
file-name: Private generic functions
Function, container-factory: Public ordinary functions
Function, file-loader-factory: Private ordinary functions
Function, get-parameter: Public ordinary functions
Function, get-service: Public ordinary functions

G
Generic Function, (setf content): Private generic functions
Generic Function, (setf file-name): Private generic functions
Generic Function, (setf instances): Private generic functions
Generic Function, (setf parameters): Private generic functions
Generic Function, (setf services): Private generic functions
Generic Function, (setf yaml): Private generic functions
Generic Function, container-expand-services: Private generic functions
Generic Function, container-get-parameter: Public generic functions
Generic Function, container-get-service: Public generic functions
Generic Function, container-instantiate-services: Private generic functions
Generic Function, container-load-file: Private generic functions
Generic Function, content: Private generic functions
Generic Function, file-name: Private generic functions
Generic Function, instances: Private generic functions
Generic Function, load-content: Private generic functions
Generic Function, parameters: Private generic functions
Generic Function, parse-yaml: Private generic functions
Generic Function, services: Private generic functions
Generic Function, yaml: Private generic functions
get-parameter: Public ordinary functions
get-service: Public ordinary functions

I
instances: Private generic functions
instances: Private generic functions

L
load-content: Private generic functions
load-content: Private generic functions

M
Method, (setf content): Private generic functions
Method, (setf file-name): Private generic functions
Method, (setf instances): Private generic functions
Method, (setf parameters): Private generic functions
Method, (setf services): Private generic functions
Method, (setf yaml): Private generic functions
Method, container-expand-services: Private generic functions
Method, container-get-parameter: Public generic functions
Method, container-get-service: Public generic functions
Method, container-instantiate-services: Private generic functions
Method, container-load-file: Private generic functions
Method, content: Private generic functions
Method, file-name: Private generic functions
Method, instances: Private generic functions
Method, load-content: Private generic functions
Method, parameters: Private generic functions
Method, parse-yaml: Private generic functions
Method, services: Private generic functions
Method, yaml: Private generic functions

P
parameters: Private generic functions
parameters: Private generic functions
parse-yaml: Private generic functions
parse-yaml: Private generic functions

S
services: Private generic functions
services: Private generic functions

Y
yaml: Private generic functions
yaml: Private generic functions


A.4 Data types

Jump to:   C   F   G   I   M   P   S  
Index Entry  Section

C
Class, container: Private classes
Class, file-loader: Private classes
container: Private classes
container.lisp: The injection/src/classes/container․lisp file

F
File, container.lisp: The injection/src/classes/container․lisp file
File, file-loader.lisp: The injection/src/classes/file-loader․lisp file
File, generic.lisp: The injection/src/util/generic․lisp file
File, injection.asd: The injection/injection․asd file
File, main.lisp: The injection/src/app/main․lisp file
File, package.lisp: The injection/src/package/package․lisp file
file-loader: Private classes
file-loader.lisp: The injection/src/classes/file-loader․lisp file

G
generic.lisp: The injection/src/util/generic․lisp file

I
injection: The injection system
injection: The injection package
injection-asd: The injection-asd package
injection.asd: The injection/injection․asd file

M
main.lisp: The injection/src/app/main․lisp file
Module, src/app: The injection/src/app module
Module, src/classes: The injection/src/classes module
Module, src/package: The injection/src/package module
Module, src/util: The injection/src/util module

P
Package, injection: The injection package
Package, injection-asd: The injection-asd package
package.lisp: The injection/src/package/package․lisp file

S
src/app: The injection/src/app module
src/classes: The injection/src/classes module
src/package: The injection/src/package module
src/util: The injection/src/util module
System, injection: The injection system