com.android.resources
Class FolderTypeRelationship

java.lang.Object
  extended by com.android.resources.FolderTypeRelationship

public final class FolderTypeRelationship
extends java.lang.Object

This class gives access to the bidirectional relationship between ResourceType and ResourceFolderType.


Constructor Summary
FolderTypeRelationship()
           
 
Method Summary
static java.util.List<ResourceFolderType> getRelatedFolders(ResourceType resType)
          Returns a list of ResourceFolderType that can contain files generating resources of the specified type.
static java.util.List<ResourceType> getRelatedResourceTypes(ResourceFolderType folderType)
          Returns a list of ResourceTypes that can be generated from files inside a folder of the specified type.
static boolean match(ResourceType resType, ResourceFolderType folderType)
          Returns true if the ResourceType and the ResourceFolderType values match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderTypeRelationship

public FolderTypeRelationship()
Method Detail

getRelatedResourceTypes

public static java.util.List<ResourceType> getRelatedResourceTypes(ResourceFolderType folderType)
Returns a list of ResourceTypes that can be generated from files inside a folder of the specified type.

Parameters:
folderType - The folder type.
Returns:
a list of ResourceType, possibly empty but never null.

getRelatedFolders

public static java.util.List<ResourceFolderType> getRelatedFolders(ResourceType resType)
Returns a list of ResourceFolderType that can contain files generating resources of the specified type.

Parameters:
resType - the type of resource.
Returns:
a list of ResourceFolderType, possibly empty but never null.

match

public static boolean match(ResourceType resType,
                            ResourceFolderType folderType)
Returns true if the ResourceType and the ResourceFolderType values match.

Parameters:
resType - the resource type.
folderType - the folder type.
Returns:
true if files inside the folder of the specified ResourceFolderType could generate a resource of the specified ResourceType