com.android.resources
Enum ResourceType

java.lang.Object
  extended by java.lang.Enum<ResourceType>
      extended by com.android.resources.ResourceType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResourceType>

public enum ResourceType
extends java.lang.Enum<ResourceType>

Enum representing a type of compiled resource.


Enum Constant Summary
ANIM
           
ANIMATOR
           
ARRAY
           
ATTR
           
BOOL
           
COLOR
           
DECLARE_STYLEABLE
           
DIMEN
           
DRAWABLE
           
FRACTION
           
ID
           
INTEGER
           
INTERPOLATOR
           
LAYOUT
           
MENU
           
MIPMAP
           
PLURALS
           
PUBLIC
           
RAW
           
STRING
           
STYLE
           
STYLEABLE
           
TRANSITION
           
XML
           
 
Method Summary
 java.lang.String getDisplayName()
          Returns a translated display name for the resource type.
static ResourceType getEnum(java.lang.String name)
          Returns the enum by its name as it appears in the XML or the R class.
 java.lang.String getName()
          Returns the resource type name, as used by XML files.
static java.lang.String[] getNames()
          Returns an array with all the names defined by this enum.
 java.lang.String toString()
           
static ResourceType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ResourceType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ANIM

public static final ResourceType ANIM

ANIMATOR

public static final ResourceType ANIMATOR

ARRAY

public static final ResourceType ARRAY

ATTR

public static final ResourceType ATTR

BOOL

public static final ResourceType BOOL

COLOR

public static final ResourceType COLOR

DECLARE_STYLEABLE

public static final ResourceType DECLARE_STYLEABLE

DIMEN

public static final ResourceType DIMEN

DRAWABLE

public static final ResourceType DRAWABLE

FRACTION

public static final ResourceType FRACTION

ID

public static final ResourceType ID

INTEGER

public static final ResourceType INTEGER

INTERPOLATOR

public static final ResourceType INTERPOLATOR

LAYOUT

public static final ResourceType LAYOUT

MENU

public static final ResourceType MENU

MIPMAP

public static final ResourceType MIPMAP

PLURALS

public static final ResourceType PLURALS

RAW

public static final ResourceType RAW

STRING

public static final ResourceType STRING

STYLE

public static final ResourceType STYLE

STYLEABLE

public static final ResourceType STYLEABLE

TRANSITION

public static final ResourceType TRANSITION

XML

public static final ResourceType XML

PUBLIC

public static final ResourceType PUBLIC
Method Detail

values

public static ResourceType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ResourceType c : ResourceType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ResourceType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getName

public java.lang.String getName()
Returns the resource type name, as used by XML files.


getDisplayName

public java.lang.String getDisplayName()
Returns a translated display name for the resource type.


getEnum

public static ResourceType getEnum(java.lang.String name)
Returns the enum by its name as it appears in the XML or the R class.

Parameters:
name - name of the resource
Returns:
the matching ResourceType or null if no match was found.

getNames

public static java.lang.String[] getNames()
Returns an array with all the names defined by this enum.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<ResourceType>