The <componentRefList> element is a child of the <component> element and specifies the list of components referenced by this component. It may not be used in conjunction with the <resourceRef> element. Configurable attributes of this element and its children may reference component substitution variables.
A component is considered a composite component if it is derived from a composite component, or is a non-derived component that does not contain a <resourceRef> element. Derived components may only contain a <componentRefList> element if they are derived from a composite component.
Name |
Type |
Req, |
Configurable |
Description |
---|---|---|---|---|
modifier |
FINAL |
No |
No |
The modifier of the list, as described below. |
The "modifier" attribute of the <componentRefList> element specifies the override requirements for the list. If specified, the value must be FINAL.
If FINAL, derived components may not declare new <componentRef> elements.
If unspecified, then derived components can add new <componentRef> elements.
In either case, derived components may override the <type> element, and non-final inherited <componentRef> elements. If the base component"s componentRefList modifier is final, then that of the derived component must also be final.
A final modifier on the <componentRefList> element does not imply that each of the contained <componentRef>s are also final.
Name |
How Many? |
Description |
---|---|---|
type |
0 or 1 |
Specifies the type that all referenced components must be instances of. If unspecified, referenced components may be of any type. |
componentRef |
0 or more |
A component reference. |
By default, a derived component inherits the <componentRefList> element contents of its base component. When a derived component declares a <componentRefList>, its contents are effectively merged with those of the base component. The derived component may declare new <componentRef> elements and override inherited ones, but may not remove elements declared by the base component.
A derived component may override the <type> element declared by the <componentRefList> of the parent component by re-declaring the <type> within its <componentRefList>. In this case, the overridden type must be an instance of the original type, or the original must be unspecified. Furthermore, all referenced components must be instances of the overridden type, including those inherited from the base component.