public class GeneratedResourceSet extends ResourceSet
ResourceSet that contains only generated files (e.g. PNGs generated from a vector
drawable XML). It is always a mirror of a normal ResourceSet which delegates to this
set when it encounters a file that needs to be replaced by generated files.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_GENERATED |
ATTR_AAPT_NAMESPACE, ATTR_FROM_DEPENDENCY, ATTR_GENERATED_SET| Constructor and Description |
|---|
GeneratedResourceSet(ResourceSet originalSet) |
GeneratedResourceSet(java.lang.String name,
com.android.ide.common.rendering.api.ResourceNamespace namespace,
java.lang.String libraryName) |
| Modifier and Type | Method and Description |
|---|---|
protected DataSet<ResourceMergerItem,ResourceFile> |
createSet(java.lang.String name) |
java.io.File |
findMatchingSourceFile(java.io.File file)
Returns the longest path matching Source file that contains a given file.
|
void |
loadFromFiles(com.android.utils.ILogger logger)
Loads the DataSet from the files its source folders contain.
|
createFileAndItems, createFileAndItemsFromXml, equals, getLibraryName, getNamespace, handleChangedFile, handleNewFile, handleRemovedFile, hashCode, isFromDependency, isValidSourceFile, readSourceFolder, setCheckDuplicates, setDontNormalizeQualifiers, setFromDependency, setGeneratedSet, setPreprocessor, setResourcesWhitelist, setShouldParseResourceIds, setTrackSourcePositionsaddItem, addSource, addSources, checkFileForAndroidRes, checkItems, getConfigName, getDataFile, getDataMap, getSourceFiles, getValidateEnabled, isEmpty, isIgnored, loadFile, processNewDataFile, setFolderFilter, setIgnoredPatterns, size, toString, updateWithpublic static final java.lang.String ATTR_GENERATED
public GeneratedResourceSet(ResourceSet originalSet)
public GeneratedResourceSet(java.lang.String name,
com.android.ide.common.rendering.api.ResourceNamespace namespace,
java.lang.String libraryName)
@NonNull protected DataSet<ResourceMergerItem,ResourceFile> createSet(@NonNull java.lang.String name)
createSet in class ResourceSetpublic void loadFromFiles(com.android.utils.ILogger logger)
throws MergingException
DataSetloadFromFiles in class DataSet<ResourceMergerItem,ResourceFile>MergingException - if something goes wrongpublic java.io.File findMatchingSourceFile(java.io.File file)
DataSetfindMatchingSourceFile in interface SourceSetfindMatchingSourceFile in class DataSet<ResourceMergerItem,ResourceFile>file - the file to search for