Annotation Interface ComponentParam


@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface ComponentParam
Specifies additional restrictions when resolving a constructor parameter whose type is another algorithm component. Use this annotation when the default recursive resolution must exclude one or more implementations.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Disallowed classes for recursive components.
    int
    Maximum number of elements when this annotation is used on a list or array.
    int
    Minimum number of elements when this annotation is used on a list or array.
  • Element Details

    • disallowed

      Class<?>[] disallowed
      Disallowed classes for recursive components. All derived classes from the disallowed list will be disallowed too. Each disallowed class must be assignable to the annotated parameter type, or to its element type when the parameter is a List or an array.
      Returns:
      disallowed classes
      Default:
      {}
    • min

      int min
      Minimum number of elements when this annotation is used on a list or array. Ignored for scalar component parameters.
      Returns:
      minimum collection size, inclusive
      Default:
      0
    • max

      int max
      Maximum number of elements when this annotation is used on a list or array. Ignored for scalar component parameters.
      Returns:
      maximum collection size, inclusive
      Default:
      3