Annotation Type ChildInject


  • @Retention(RUNTIME)
    @Target({FIELD,PARAMETER})
    @InjectionPointIndicator
    public @interface ChildInject
    This Injection point indicator can be used for services that have a hierarchical names. The name space of the name fields of the ActiveDescriptors must form a directed acyclical graph. For example, this is useful if using a naming scheme based on an XML hierarchy.

    If the injection point of this annotation is of type ChildIterable then the generic type of the ChildIterable must contain the Type of the underlying service, and the ChildIterable will contain all of the children services whose name starts with the name of the parent ActiveDescriptor appended with the value field of this annotation.

    If the injection point is NOT a ChildIterable then the type is as per a normal injection point, but the chosen instance of that type will have a name that starts with the name of the parent ActiveDescriptor appended with the value field of this annotation

    Author:
    jwells
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String separator
      This field returns the separator that is used to separate heirarchical name fields, for use by the ChildIterable.byKey(String) method.
      String value
      The string that will be appended to the name field of the ActiveDescriptor of the parent of this injection point
    • Element Detail

      • value

        String value
        The string that will be appended to the name field of the ActiveDescriptor of the parent of this injection point
        Returns:
        The value to append to the name field of the ActiveDescriptor of the parent of this injection point
        Default:
        ""
      • separator

        String separator
        This field returns the separator that is used to separate heirarchical name fields, for use by the ChildIterable.byKey(String) method. This value will be pre-pended to the name given to the ChildIterable.byKey(String) key parameter
        Returns:
        The separator used to separate a hierachical namespace
        Default:
        "."