In Component based programming the Stereotype annotation tells the Dependency Injection framework that a class is a component and an instance should be created for injection (in the Context)


The base component to create singletons in the Context

This stereotype is a meta annotation and can be used to creation other marker stereotypes to make the code cleaner.

The current marker component stereotypes are Repository, Gateway, Mapper, Service

This will result in a bean called component in the DI Context:

public class Component {

To inject the value then you use an Injection marker:

Component component;


Used for compoenents that represent repositories of data:

public void IssueRepository {

  Issue findAll() {


Used for components that interface with external systems they act as a gateway


Used for components that transform data from one form to another


Used to mark components that provide a set of business logic


Another meta annotation for components that are intended to be used for multple values to be injected.

Guice requires special semantics for multiple injection i.e. into Lists and Sets:

public class A implements Contract {

public class B implements Contract {

public Class Bean {
  Set<Contract> values;


For components that are intended as additions to the system


For components where you select one of the implementations that are available


The StickyCode framework its self is based on components, for some DI systems these components but be initialised in a first pass.

All system components and annotatied as Framework components for this purpose