Annotation Type Component


@Retention(RUNTIME)
@Target(TYPE)
public @interface Component
Mark a class as a component so it can be managed by the API.

This annotation mark any class as an IoC component. if scope of the component is no specified it will be an application scoped component.

Author:
Gilberto Vento
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    boolean instantiate
    If the component must be instantiate eager or lazy
    java.lang.Class<? extends Scope> scope
    Defines the scope of a component.
  • Element Details

    • scope

      java.lang.Class<? extends Scope> scope
      Defines the scope of a component.
      Returns:
      The class that represents the scope of the component.
      Default:
      me.gilbva.shrike.scope.Application.class
    • instantiate

      boolean instantiate
      If the component must be instantiate eager or lazy
      Returns:
      true the component will be instantiated eager, the default is false witch means that the component will be instantiated lazy the first time some one request it.
      Default:
      false