Package org.robolectric.res
Class AttributeResource
- java.lang.Object
-
- org.robolectric.res.AttributeResource
-
public class AttributeResource extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANDROID_NS
static String
ANDROID_RES_NS_PREFIX
String
contextPackageName
static String
EMPTY_VALUE
static Pattern
IS_RESOURCE_REFERENCE
static String
NULL_VALUE
static String
RES_AUTO_NS_URI
ResName
resName
String
trimmedValue
String
value
-
Constructor Summary
Constructors Constructor Description AttributeResource(ResName resName, String value, String contextPackageName)
AttributeResource(ResName resName, String value, String contextPackageName, Integer referenceResId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getReferenceResId()
ResName
getResourceReference()
static ResName
getResourceReference(String value, String defPackage, String defType)
ResName
getStyleReference()
static ResName
getStyleReference(String value, String defPackage, String defType)
boolean
isEmpty()
static boolean
isEmpty(String value)
boolean
isNull()
static boolean
isNull(String value)
boolean
isResourceReference()
static boolean
isResourceReference(String value)
boolean
isStyleReference()
static boolean
isStyleReference(String value)
String
toString()
-
-
-
Field Detail
-
ANDROID_NS
public static final String ANDROID_NS
- See Also:
- Constant Field Values
-
ANDROID_RES_NS_PREFIX
public static final String ANDROID_RES_NS_PREFIX
- See Also:
- Constant Field Values
-
RES_AUTO_NS_URI
public static final String RES_AUTO_NS_URI
- See Also:
- Constant Field Values
-
NULL_VALUE
public static final String NULL_VALUE
- See Also:
- Constant Field Values
-
EMPTY_VALUE
public static final String EMPTY_VALUE
- See Also:
- Constant Field Values
-
IS_RESOURCE_REFERENCE
public static final Pattern IS_RESOURCE_REFERENCE
-
-
Method Detail
-
isResourceReference
public boolean isResourceReference()
-
isStyleReference
public boolean isStyleReference()
-
getStyleReference
public ResName getStyleReference()
-
isNull
public boolean isNull()
-
isEmpty
public boolean isEmpty()
-
isResourceReference
public static boolean isResourceReference(String value)
-
getResourceReference
@Nonnull public static ResName getResourceReference(String value, String defPackage, String defType)
-
isStyleReference
public static boolean isStyleReference(String value)
-
getStyleReference
public static ResName getStyleReference(String value, String defPackage, String defType)
-
isNull
public static boolean isNull(String value)
-
isEmpty
public static boolean isEmpty(String value)
-
getReferenceResId
public Integer getReferenceResId()
-
-