Package me.gilbva.shrike.annotations
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 booleaninstantiateIf the component must be instantiate eager or lazyjava.lang.Class<? extends Scope>scopeDefines the scope of a component.
-
Element Details
-
scope
java.lang.Class<? extends Scope> scopeDefines the scope of a component.- Returns:
- The class that represents the scope of the component.
- Default:
- me.gilbva.shrike.scope.Application.class
-
instantiate
boolean instantiateIf 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
-