Interface MergeHandler

    • Method Detail

      • canMerge

        boolean canMerge​(Extension extension)
        Checks whether this merger can merge the given extension.
        Parameters:
        extension - The extension
        Returns:
        true if merger can handle this
      • merge

        void merge​(HandlerContext context,
                   Feature target,
                   Feature source,
                   Extension targetEx,
                   Extension sourceEx)
        Merge the source extension into the target extension. Only called if canMerge(Extension) for the extension returned true. If the target does not yet contain this extension, then the targetEx argument is null. In that case the handler should add the extension to the target.
        Parameters:
        context - Context for the handler
        target - The target feature
        source - The source feature
        targetEx - The target extension or null if the extension does not exist in the target.
        sourceEx - The source extension
        Throws:
        IllegalStateException - If the extensions can't be merged