public class SampleDataResourceValue extends ResourceValueImpl
ResourceValue used to contain the value of a Sample Data source. This class avoids
having to split potentially large files multiple times since we store it as a list of lines.mNamespaceResolver| Constructor and Description |
|---|
SampleDataResourceValue(ResourceReference reference,
byte[] content) |
| Modifier and Type | Method and Description |
|---|---|
ResourceReference |
getReference()
If this
ResourceValue references another one, returns a ResourceReference to
it, otherwise null. |
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML.
|
com.google.common.collect.ImmutableList<java.lang.String> |
getValueAsLines() |
asReference, equals, getLibraryName, getName, getNamespace, getNamespaceResolver, getRawXmlValue, getResourceType, getResourceUrl, hashCode, isFramework, isUserDefined, replaceWith, setNamespaceLookup, setNamespaceResolver, setValue, toStringpublic SampleDataResourceValue(@NonNull
ResourceReference reference,
@Nullable
byte[] content)
@Nullable public java.lang.String getValue()
ResourceValuenull, for
example for instances of StyleResourceValue.getValue in interface ResourceValueTempgetValue in class ResourceValue@NonNull public com.google.common.collect.ImmutableList<java.lang.String> getValueAsLines()
@Nullable public ResourceReference getReference()
ResourceValueResourceValue references another one, returns a ResourceReference to
it, otherwise null.
This method should be called before inspecting the textual value (ResourceValue.getValue()), as
it handles namespaces correctly.
getReference in interface ResourceValueTempgetReference in class ResourceValue