dependency

inline fun <M : Module> dependency(identifier: String? = null): M

Retrieves a module of type M from the dependency graph. This method can be used in the ConfigurationBuilder.module scope to access other modules that are already registered in the graph.

Return

The module instance of type M if it was previously registered or throws an error if not found.

Parameters

identifier

An optional identifier key associated with the instance built via ConfigurationBuilder.module.