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
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThis field returns the separator that is used to separate heirarchical name fields, for use by theChildIterable.byKey(String)
method.The string that will be appended to the name field of the ActiveDescriptor of the parent of this injection point
-
Element Details
-
value
String valueThe 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 separatorThis field returns the separator that is used to separate heirarchical name fields, for use by theChildIterable.byKey(String)
method. This value will be pre-pended to the name given to theChildIterable.byKey(String)
key parameter- Returns:
- The separator used to separate a hierachical namespace
- Default:
"."
-