Annotation Interface RomaritimeBean


@Retention(RUNTIME) @Target({METHOD,TYPE,PARAMETER,FIELD}) public @interface RomaritimeBean
Annotation to mark elements for the Sigewine Dependency Injection (DI) framework.

Usage:

  • Method: Marks the method as a bean provider. The declaring class must have a no-args constructor.
  • Class: Marks the class as a bean. The class must have either a no-args constructor or a constructor accepting other beans. Only one constructor is allowed.
  • Parameter: Specifies a bean to be injected into the class.
  • Field: Specifies a TypedCollection. Beans will be injected based on the TypedCollection's type.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the name of the bean.
  • Element Details

    • name

      String name
      Specifies the name of the bean. If not provided, the name defaults to the class name (for classes) or method name (for methods).
      Returns:
      The name of the bean.
      Default:
      ""