public class ResourceValue extends ResourceReference
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
mValue |
| Constructor and Description |
|---|
ResourceValue(ResourceType type,
java.lang.String name,
boolean isFramework) |
ResourceValue(ResourceType type,
java.lang.String name,
boolean isFramework,
java.lang.String libraryName) |
ResourceValue(ResourceType type,
java.lang.String name,
java.lang.String value,
boolean isFramework) |
ResourceValue(ResourceType type,
java.lang.String name,
java.lang.String value,
boolean isFramework,
java.lang.String libraryName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getLibraryName()
Returns the name of the library where this resource was found or null if it is not from a library.
|
java.lang.String |
getRawXmlValue()
Similar to
getValue(), but returns the raw XML value. |
ResourceType |
getResourceType() |
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML.
|
int |
hashCode() |
boolean |
isUserDefined()
Returns true if the resource is user defined.
|
void |
replaceWith(ResourceValue value)
Sets the value from another resource.
|
void |
setValue(java.lang.String value)
Sets the value of the resource.
|
java.lang.String |
toString() |
getName, isFrameworkpublic ResourceValue(ResourceType type, java.lang.String name, boolean isFramework)
public ResourceValue(ResourceType type, java.lang.String name, boolean isFramework, java.lang.String libraryName)
public ResourceValue(ResourceType type, java.lang.String name, java.lang.String value, boolean isFramework)
public ResourceValue(ResourceType type, java.lang.String name, java.lang.String value, boolean isFramework, java.lang.String libraryName)
public ResourceType getResourceType()
public java.lang.String getLibraryName()
public boolean isUserDefined()
@Nullable public java.lang.String getValue()
null,
for example for instances of StyleResourceValue.public java.lang.String getRawXmlValue()
getValue(), but returns the raw XML value. This is usually
the same as getValue, but with a few exceptions. For example, for markup strings,
you can have * <string name="markup">This is <b>bold</b></string>.
Here, getValue() will return "This is bold" -- e.g. just
the plain text flattened. However, this method will return "This is <b>bold</b>",
which preserves the XML markup elements.public void setValue(java.lang.String value)
value - the new valuepublic void replaceWith(ResourceValue value)
value - the resource valuepublic java.lang.String toString()
toString in class ResourceReferencepublic int hashCode()
hashCode in class ResourceReferencepublic boolean equals(java.lang.Object obj)
equals in class ResourceReference