klyn.di.DIContext.getComponent
method

    public getComponent(name as String) as Object:

Description

Returns a registered component by name.

Parameters

- name Component name.

Returns

The registered component instance.

Throws

- ComponentNotFoundException if no component is registered under the requested name. ```klyn import klyn.di context = DIContext() service = Object() context.registerComponent("service", service) assert context.getComponent("service") == service ```