|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.ide.common.resources.ResourceFile
com.android.ide.common.resources.MultiResourceFile
public final class MultiResourceFile
Represents a resource file able to declare multiple resources, which could be of
different ResourceType
.
Constructor Summary | |
---|---|
MultiResourceFile(com.android.io.IAbstractFile file,
ResourceFolder folder)
|
Method Summary | |
---|---|
void |
addResourceValue(com.android.ide.common.rendering.api.ResourceValue value)
Adds a resource item to the list |
protected void |
dispose(ScanningContext context)
|
java.util.Collection<com.android.resources.ResourceType> |
getResourceTypes()
Returns the list of ResourceType generated by the file. |
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. |
boolean |
hasResources(com.android.resources.ResourceType type)
Returns whether the file generated a resource of a specific type. |
boolean |
hasResourceValue(com.android.resources.ResourceType type,
java.lang.String name)
|
protected void |
load(ScanningContext context)
|
protected void |
update(ScanningContext context)
|
Methods inherited from class com.android.ide.common.resources.ResourceFile |
---|
getConfiguration, getFile, getFolder, getRepository, isFramework, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiResourceFile(com.android.io.IAbstractFile file, ResourceFolder folder)
Method Detail |
---|
protected void load(ScanningContext context)
load
in class ResourceFile
protected void update(ScanningContext context)
update
in class ResourceFile
protected void dispose(ScanningContext context)
dispose
in class ResourceFile
public java.util.Collection<com.android.resources.ResourceType> getResourceTypes()
ResourceFile
ResourceType
generated by the file. This is never null.
getResourceTypes
in class ResourceFile
public boolean hasResources(com.android.resources.ResourceType type)
ResourceFile
hasResources
in class ResourceFile
type
- The ResourceType
public void addResourceValue(com.android.ide.common.rendering.api.ResourceValue value)
addResourceValue
in interface ValueResourceParser.IValueResourceRepository
value
- The value of the resource.public boolean hasResourceValue(com.android.resources.ResourceType type, java.lang.String name)
hasResourceValue
in interface ValueResourceParser.IValueResourceRepository
public com.android.ide.common.rendering.api.ResourceValue getValue(com.android.resources.ResourceType type, java.lang.String name)
ResourceFile
ResourceType
and name.
If no resource match, null
is returned.
getValue
in class ResourceFile
type
- the type of the resource.name
- the name of the resource.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |