FileDocCategorySizeDatePackage
ResourceFile.javaAPI DocAndroid 1.5 API3416Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.resources.manager

ResourceFile

public abstract class ResourceFile extends Resource
Represents a Resource file (a file under $Project/res/)

Fields Summary
private final com.android.ide.eclipse.editors.resources.manager.files.IAbstractFile
mFile
private final ResourceFolder
mFolder
Constructors Summary
protected ResourceFile(com.android.ide.eclipse.editors.resources.manager.files.IAbstractFile file, ResourceFolder folder)

        mFile = file;
        mFolder = folder;
    
Methods Summary
public com.android.ide.eclipse.editors.resources.configurations.FolderConfigurationgetConfiguration()

        return mFolder.getConfiguration();
    
public final com.android.ide.eclipse.editors.resources.manager.files.IAbstractFilegetFile()
Returns the IFile associated with the ResourceFile.

        return mFile;
    
public final ResourceFoldergetFolder()
Returns the parent folder as a {@link ResourceFolder}.

        return mFolder;
    
public abstract com.android.ide.eclipse.common.resources.ResourceType[]getResourceTypes()
Returns the list of {@link ResourceType} generated by the file.

public abstract java.util.CollectiongetResources(com.android.ide.eclipse.common.resources.ResourceType type, ProjectResources projectResources)
Get the list of {@link ProjectResourceItem} of a specific type generated by the file. This method must make sure not to create duplicate.

param
type The type of {@link ProjectResourceItem} to return.
param
projectResources The global Project Resource object, allowing the implementation to query for already existing {@link ProjectResourceItem}
return
The list of new {@link ProjectResourceItem}
see
ProjectResources#findResourceItem(ResourceType, String)

public abstract com.android.layoutlib.api.IResourceValuegetValue(com.android.ide.eclipse.common.resources.ResourceType type, java.lang.String name)
Returns the value of a resource generated by this file by {@link ResourceType} and name.

If no resource match, null is returned.

param
type the type of the resource.
param
name the name of the resource.

public abstract booleanhasResources(com.android.ide.eclipse.common.resources.ResourceType type)
Returns whether the file generated a resource of a specific type.

param
type The {@link ResourceType}

public final booleanisFramework()
Returns whether the resource is a framework resource.

        return mFolder.isFramework();