@ConsumerType
public interface MergeHandler
FeatureBuilder via
BuilderContext.addMergeExtensions(MergeHandler...). When the feature
builder is merging features, the first handler that returns true for
an extension in canMerge(Extension) merges the extension. Further
handlers are not tested anymore.| Modifier and Type | Method and Description |
|---|---|
boolean |
canMerge(Extension extension)
Checks whether this merger can merge the given extension.
|
void |
merge(HandlerContext context,
Feature target,
Feature source,
Extension targetEx,
Extension sourceEx)
Merge the source extension into the target extension.
|
boolean canMerge(Extension extension)
extension - The extensiontrue if merger can handle thisvoid merge(HandlerContext context, Feature target, Feature source, Extension targetEx, Extension sourceEx)
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.context - Context for the handlertarget - The target featuresource - The source featuretargetEx - The target extension or null if the extension does
not exist in the target.sourceEx - The source extensionIllegalStateException - If the extensions can't be mergedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.