By default, a derived component inherits all accessible install blocks of its base component.
A derived component may define additional install blocks by using names that are not among those of the install blocks inherited from the base component. A derived component may override a non-final inherited install block by redeclaring a block with the same name. Note that blocks are overridden using name alone, and may not be overloaded based on parameters. When a block is overridden, the entire content of the block must be re-declared, including the access mode, modifier, parameters and body. The body is specified if and only if the overriding block is non-abstract. The access mode may be no more restrictive than that of the base component.
The signature of the overriding block in the derived component must be compatible with that of the base component. By compatible, it is meant that any arguments that are acceptable to the base block must also be acceptable to the derived block.
A derived block is compatible with a base block if:
It does not declare a new required parameter.
It does not redefine a parameter that was optional in the parent block to be required.
The following signature changes are considered compatible:
Removal of a parameter (required or optional).
Making a required parameter optional.
Addition of an optional parameter.
When a block is overridden, then all references to the block evaluate to the overridden value, including those in the base component.
If the derived component is declared as non-abstract, then any abstract blocks declared by the base component must be overridden by the derived component.
A block in a derived component may explicitly call into a block defined by the base component even if the derived overrides the block using the <superComponent> targeter.