public abstract class ResourceFile extends java.lang.Object implements Configurable
Modifier | Constructor and Description |
---|---|
protected |
ResourceFile(com.android.io.IAbstractFile file,
ResourceFolder folder) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
dispose(ScanningContext context) |
FolderConfiguration |
getConfiguration()
Returns the
FolderConfiguration for this object. |
com.android.io.IAbstractFile |
getFile()
Returns the IFile associated with the ResourceFile.
|
ResourceFolder |
getFolder()
Returns the parent folder as a
ResourceFolder . |
ResourceRepository |
getRepository() |
abstract java.util.Collection<com.android.resources.ResourceType> |
getResourceTypes()
Returns the list of
ResourceType generated by the file. |
abstract com.android.ide.common.rendering.api.ResourceValue |
getValue(com.android.resources.ResourceType type,
java.lang.String name)
Returns the value of a resource generated by this file by
ResourceType and name. |
abstract boolean |
hasResources(com.android.resources.ResourceType type)
Returns whether the file generated a resource of a specific type.
|
boolean |
isFramework()
Returns whether the resource is a framework resource.
|
protected abstract void |
load(ScanningContext context) |
java.lang.String |
toString() |
protected abstract void |
update(ScanningContext context) |
protected ResourceFile(com.android.io.IAbstractFile file, ResourceFolder folder)
protected abstract void load(ScanningContext context)
protected abstract void update(ScanningContext context)
protected abstract void dispose(ScanningContext context)
public FolderConfiguration getConfiguration()
Configurable
FolderConfiguration
for this object.getConfiguration
in interface Configurable
public final com.android.io.IAbstractFile getFile()
public final ResourceFolder getFolder()
ResourceFolder
.public final ResourceRepository getRepository()
public final boolean isFramework()
public abstract java.util.Collection<com.android.resources.ResourceType> getResourceTypes()
ResourceType
generated by the file. This is never null.public abstract boolean hasResources(com.android.resources.ResourceType type)
type
- The ResourceType
public abstract com.android.ide.common.rendering.api.ResourceValue getValue(com.android.resources.ResourceType type, java.lang.String name)
ResourceType
and name.
If no resource match, null
is returned.
type
- the type of the resource.name
- the name of the resource.public java.lang.String toString()
toString
in class java.lang.Object