com.android.ide.common.res2
Class PreprocessResourcesWriter

java.lang.Object
  extended by com.android.ide.common.res2.MergeWriter<PreprocessDataItem>
      extended by com.android.ide.common.res2.PreprocessResourcesWriter
All Implemented Interfaces:
MergeConsumer<PreprocessDataItem>

public class PreprocessResourcesWriter
extends MergeWriter<PreprocessDataItem>

MergeWriter for preprocessing resources.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.android.ide.common.res2.MergeConsumer
MergeConsumer.ConsumerException
 
Constructor Summary
PreprocessResourcesWriter(java.io.File rootFolder)
           
 
Method Summary
 void addItem(PreprocessDataItem item)
          Adds an item.
 boolean ignoreItemInMerge(PreprocessDataItem item)
           
 void removeItem(PreprocessDataItem removedItem, PreprocessDataItem replacedBy)
          Removes an item.
 
Methods inherited from class com.android.ide.common.res2.MergeWriter
end, getExecutor, getRootFolder, postWriteAction, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreprocessResourcesWriter

public PreprocessResourcesWriter(@NonNull
                                 java.io.File rootFolder)
Method Detail

addItem

public void addItem(@NonNull
                    PreprocessDataItem item)
             throws MergeConsumer.ConsumerException
Description copied from interface: MergeConsumer
Adds an item. The item may already be existing. Calling DataItem.isTouched() will indicate whether the item actually changed.

Parameters:
item - the new item.
Throws:
MergeConsumer.ConsumerException

removeItem

public void removeItem(@NonNull
                       PreprocessDataItem removedItem,
                       @Nullable
                       PreprocessDataItem replacedBy)
                throws MergeConsumer.ConsumerException
Description copied from interface: MergeConsumer
Removes an item. Optionally pass the item that will replace this one. This methods does not do the replacement. The replaced item is just there in case the removal can be optimized when it's a replacement vs. a removal.

Parameters:
removedItem - the removed item.
replacedBy - the optional item that replaces the removed item.
Throws:
MergeConsumer.ConsumerException

ignoreItemInMerge

public boolean ignoreItemInMerge(PreprocessDataItem item)