11.5.  Extending Interfaces or Connectors

It is also possible to extend interfaces or connectors defined via apply. That is sometimes quite useful as shown in the following example:

artifact Module2
{
    include "Module2/**"
    
    apply "layering"
    
    // New artifact that should also be part of the service interface
    artifact ServiceInterface
    {
        include "**/serviceinterface/**"
    }
    
    // Make the ServiceInterface artifact part of the interface Service
    extend interface Service
    {
        // add an extra export
        export ServiceInterface
    }
}
    

Without the possibility to extend interfaces or connectors we would be forced to create a completely new interface with a different name.