Annotation Interface Injectable


Marks a field, method, constructor, or parameter as an injection point in the ContextFX IoC container.

The dependency injectors (e.g., ComponentInjector) inspect every registered component for members annotated with @Injectable and resolve the corresponding instances from the Container using the provided identifier.

  • Field injection: the resolved instance is set directly on the field.
  • Method injection: the method is invoked with the resolved parameters.
  • Constructor injection: a new instance is created via the annotated constructor.
  • Parameter injection: individual parameters within a method or constructor are resolved.
Author:
Ramon Rangel Osorio <ramon.rangel@protonmail.com>
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The identifier of the component to inject, as registered in the container.
  • Element Details

    • value

      String value
      The identifier of the component to inject, as registered in the container. When blank, the injection point type is used to locate the component.
      Returns:
      the target component identifier, or an empty string to resolve by type
      Default:
      ""