|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.ide.common.resources.ResourceFolder
public final class ResourceFolder
Resource Folder class. Contains list of ResourceFile
s,
the FolderConfiguration
, and a link to the IAbstractFolder
object.
Constructor Summary | |
---|---|
protected |
ResourceFolder(com.android.resources.ResourceFolderType type,
FolderConfiguration config,
com.android.io.IAbstractFolder folder,
ResourceRepository repository)
Creates a new ResourceFolder |
Method Summary | |
---|---|
void |
addFile(ResourceFile file)
Adds a ResourceFile to the folder. |
protected void |
dispose(ScanningContext context)
|
FolderConfiguration |
getConfiguration()
Returns the FolderConfiguration for this object. |
ResourceFile |
getFile(java.lang.String filename)
Returns the ResourceFile matching a given name. |
com.android.io.IAbstractFolder |
getFolder()
Returns the IAbstractFolder associated with this object. |
ResourceRepository |
getRepository()
|
java.util.Collection<com.android.resources.ResourceType> |
getResourceTypes()
Returns the list of ResourceType s generated by the files inside this folder. |
com.android.resources.ResourceFolderType |
getType()
Returns the ResourceFolderType of this object. |
boolean |
hasFile(java.lang.String name)
Returns whether the folder contains a file with the given name. |
boolean |
hasResources(com.android.resources.ResourceType type)
Returns whether a file in the folder is generating a resource of a specified type. |
ResourceFile |
processFile(com.android.io.IAbstractFile file,
ResourceDeltaKind kind,
ScanningContext context)
Processes a file and adds it to its parent folder resource. |
protected void |
removeFile(ResourceFile file,
ScanningContext context)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ResourceFolder(com.android.resources.ResourceFolderType type, FolderConfiguration config, com.android.io.IAbstractFolder folder, ResourceRepository repository)
ResourceFolder
type
- The type of the folderconfig
- The configuration of the folderfolder
- The associated IAbstractFolder
object.repository
- The associated ResourceRepository
Method Detail |
---|
public ResourceFile processFile(com.android.io.IAbstractFile file, ResourceDeltaKind kind, ScanningContext context)
file
- the underlying resource file.kind
- the file change kind.context
- a context object with state for the current update, such
as a place to stash errors encountered
ResourceFile
that was created.public void addFile(ResourceFile file)
ResourceFile
to the folder.
file
- The ResourceFile
.protected void removeFile(ResourceFile file, ScanningContext context)
protected void dispose(ScanningContext context)
public com.android.io.IAbstractFolder getFolder()
IAbstractFolder
associated with this object.
public com.android.resources.ResourceFolderType getType()
ResourceFolderType
of this object.
public ResourceRepository getRepository()
public java.util.Collection<com.android.resources.ResourceType> getResourceTypes()
ResourceType
s generated by the files inside this folder.
public FolderConfiguration getConfiguration()
Configurable
FolderConfiguration
for this object.
getConfiguration
in interface Configurable
public boolean hasFile(java.lang.String name)
name
- the name of the file.public ResourceFile getFile(java.lang.String filename)
ResourceFile
matching a given name.
filename
- The name of the file to return.
ResourceFile
or null
if no match was found.public boolean hasResources(com.android.resources.ResourceType type)
type
- The ResourceType
being looked up.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |