|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.ide.common.res2.ResourceItem
public class ResourceItem
A resource.
This includes the name, type, source file as a ResourceFile and an optional Node
in case of a resource coming from a value file.
| Field Summary | |
|---|---|
protected com.android.ide.common.rendering.api.ResourceValue |
mResourceValue
|
| Constructor Summary | |
|---|---|
ResourceItem(java.lang.String name,
com.android.resources.ResourceType type,
org.w3c.dom.Node value)
Constructs the object with a name, type and optional value. |
|
| Method Summary | |
|---|---|
int |
compareTo(ResourceItem resourceItem)
|
boolean |
compareValueWith(ResourceItem resource)
Compares the ResourceItem getValue() together and returns true if they are the
same. |
boolean |
equals(java.lang.Object o)
|
FolderConfiguration |
getConfiguration()
Returns the FolderConfiguration for this object. |
boolean |
getIgnoredFromDiskMerge()
|
java.lang.String |
getKey()
Returns a key for this resource. |
java.lang.String |
getName()
Returns the name of the item. |
java.lang.String |
getQualifiers()
Returns the resource item qualifiers. |
com.android.ide.common.rendering.api.ResourceValue |
getResourceValue(boolean isFrameworks)
|
F |
getSource()
Returns the DataFile the item is coming from. |
com.android.ide.common.res2.DataFile.FileType |
getSourceType()
|
protected int |
getStatus()
|
com.android.resources.ResourceType |
getType()
Returns the type of the resource. |
org.w3c.dom.Node |
getValue()
Returns the optional value of the resource. |
java.lang.String |
getValueText()
Returns the optional string value of the resource. |
java.lang.String |
getXmlString(com.android.resources.ResourceType type,
boolean system)
Returns a formatted string usable in an XML to use for the ResourceItem. |
int |
hashCode()
|
void |
setIgnoredFromDiskMerge(boolean ignored)
|
void |
setSource(F sourceFile)
Sets the DataFile |
java.lang.String |
toString()
|
protected void |
wasTouched()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected com.android.ide.common.rendering.api.ResourceValue mResourceValue
| Constructor Detail |
|---|
public ResourceItem(@NonNull
java.lang.String name,
@NonNull
com.android.resources.ResourceType type,
@Nullable
org.w3c.dom.Node value)
name - the name of the resourcetype - the type of the resourcevalue - an optional Node that represents the resource value.| Method Detail |
|---|
@NonNull public com.android.resources.ResourceType getType()
@Nullable public org.w3c.dom.Node getValue()
@Nullable public java.lang.String getValueText()
@NonNull public java.lang.String getQualifiers()
@NonNull public com.android.ide.common.res2.DataFile.FileType getSourceType()
public FolderConfiguration getConfiguration()
ConfigurableFolderConfiguration for this object.
getConfiguration in interface Configurablepublic java.lang.String getKey()
ResourceFile, this will throw an IllegalStateException.
java.lang.IllegalStateException - if the resource is not added to a ResourceFileprotected void wasTouched()
@Nullable public com.android.ide.common.rendering.api.ResourceValue getResourceValue(boolean isFrameworks)
public java.lang.String getXmlString(com.android.resources.ResourceType type,
boolean system)
ResourceItem.
system - Whether this is a system resource or a project resource.
public boolean compareValueWith(ResourceItem resource)
getValue() together and returns true if they are the
same.
resource - The ResourceItem object to compare to.
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
public int hashCode()
public int compareTo(@NonNull
ResourceItem resourceItem)
compareTo in interface java.lang.Comparable<ResourceItem>public void setIgnoredFromDiskMerge(boolean ignored)
public boolean getIgnoredFromDiskMerge()
@NonNull public java.lang.String getName()
@Nullable public F getSource()
public void setSource(F sourceFile)
sourceFile - the DataFileprotected int getStatus()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||