public class TextResourceValue extends ResourceValueImpl
ResourceValue intended for text nodes where we need access to the raw XML text.mNamespaceResolver| Constructor and Description |
|---|
TextResourceValue(ResourceNamespace namespace,
ResourceType type,
java.lang.String name,
java.lang.String textValue,
java.lang.String rawXmlValue,
java.lang.String libraryName) |
TextResourceValue(ResourceReference reference,
java.lang.String textValue,
java.lang.String rawXmlValue,
java.lang.String libraryName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getRawXmlValue()
Similar to
ResourceValue.getValue(), but returns the raw XML value. |
int |
hashCode() |
void |
setRawXmlValue(java.lang.String value) |
asReference, getLibraryName, getName, getNamespace, getNamespaceResolver, getReference, getResourceType, getResourceUrl, getValue, isFramework, isUserDefined, replaceWith, setNamespaceLookup, setNamespaceResolver, setValue, toStringpublic TextResourceValue(@NonNull
ResourceReference reference,
@Nullable
java.lang.String textValue,
@Nullable
java.lang.String rawXmlValue,
@Nullable
java.lang.String libraryName)
public TextResourceValue(@NonNull
ResourceNamespace namespace,
@NonNull
ResourceType type,
@NonNull
java.lang.String name,
@Nullable
java.lang.String textValue,
@Nullable
java.lang.String rawXmlValue,
@Nullable
java.lang.String libraryName)
public java.lang.String getRawXmlValue()
ResourceValueResourceValue.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, ResourceValue.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.getRawXmlValue in interface ResourceValueTempgetRawXmlValue in class ResourceValuepublic void setRawXmlValue(java.lang.String value)
public int hashCode()
hashCode in class ResourceValuepublic boolean equals(java.lang.Object obj)
equals in class ResourceValue