Annotation Type Reference


  • @Documented
    @Qualifier
    @Retention(RUNTIME)
    @Target({FIELD,PARAMETER})
    public @interface Reference
    Annotation used on injection points informing the CDI container that the injection should apply a service obtained from the OSGi registry.

    *

    Author:
    $Id: bcb5a95650a474eadf267299c486248ce66751b9 $
    See Also:
    "Reference Annotation"
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String target
      The target property for this reference.
      java.lang.Class<?> value
      Specify the type of the service for this reference.
    • Element Detail

      • value

        java.lang.Class<?> value
        Specify the type of the service for this reference.

        If not specified, the type of the service for this reference is derived from the injection point type.

        If a value is specified it must be type compatible with (assignable to) the service type derived from the injection point type, otherwise a definition error will result.

        Default:
        java.lang.Object.class
      • target

        java.lang.String target
        The target property for this reference.

        If not specified, no target property is set.

        Default:
        ""