Annotation Type DependencyProvider


  • @Documented
    @Target(METHOD)
    @Retention(RUNTIME)
    public @interface DependencyProvider
    Use this annotation to define a dependency. Below are the options:

    `id` - can be used to assign an unique id against the dependency.

    `singleton` - can be used to modify the class's singleton behavior. Default: true

    `isDefault` - if class is child of an interface/class and there can be multiple other types of same interface/class

    then use this to mark this as the default implementation for the corresponding interface/class type.

    Constraints:

    1) No java.lang.* type can be used as @DependencyProvider 2) `initMethod` must be present in the same class 3) `initMethod` must be static

    • Element Detail

      • profiles

        String[] profiles
        Default:
        {}
      • singleton

        boolean singleton
        Default:
        true
      • isDefault

        boolean isDefault
        Default:
        false