Skip navigation links

Package sirius.kernel.di

Contains the micro kernel for the discovery based programming framework.

See: Description

Package sirius.kernel.di Description

Contains the micro kernel for the discovery based programming framework.

The Micro Kernel

This annotation based framework is the heart of SIRIUS. Most of the time, the annotations Register will be used to put parts (components) into the injector and Part or Parts will be used to retrieve (discover) those.

Note that all these annotations are not part of the micro kernel but already extensions to it (this is why it is a micro kernel). Therefore own handlers for custom annotations or patterns can be implemented and treated as first class citizens.

Adding Functionality

To provide such functionality, a ClassLoadAction or a FieldAnnotationProcessor has to be implemented. Those implementation will be picked up by Sirius during the start phase and therefore be automatically applied. All that is required is a file called component.marker in the classpath root of the respective code base to make these and other classes visible to Sirius.

Accessing Components

To access components without using annotations, the Injector class can be used. If provides access to the GlobalContext which contains all registered parts (components). Note that the GlobalContext can also be injected using a Part annotation.
Skip navigation links

Copyright © 2017. All rights reserved.