public interface MergeConsumer<I extends com.android.ide.common.res2.DataItem>
DataMerger.mergeData(MergeConsumer, boolean)
.Modifier and Type | Interface and Description |
---|---|
static class |
MergeConsumer.ConsumerException
An exception thrown during resource merging by the consumer.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(I item)
Adds an item.
|
void |
end()
Called after the merge ends.
|
boolean |
ignoreItemInMerge(I item) |
void |
removeItem(I removedItem,
I replacedBy)
Removes an item.
|
void |
start(javax.xml.parsers.DocumentBuilderFactory factory)
Called before the merge starts.
|
void start(@NonNull javax.xml.parsers.DocumentBuilderFactory factory) throws MergeConsumer.ConsumerException
MergeConsumer.ConsumerException
void end() throws MergeConsumer.ConsumerException
MergeConsumer.ConsumerException
void addItem(@NonNull I item) throws MergeConsumer.ConsumerException
DataItem.isTouched()
will
indicate whether the item actually changed.item
- the new item.MergeConsumer.ConsumerException
void removeItem(@NonNull I removedItem, @Nullable I replacedBy) throws MergeConsumer.ConsumerException
removedItem
- the removed item.replacedBy
- the optional item that replaces the removed item.MergeConsumer.ConsumerException
boolean ignoreItemInMerge(I item)