public static class ResourceUsageModel.Resource extends java.lang.Object implements java.lang.Comparable<ResourceUsageModel.Resource>
| Modifier and Type | Field and Description |
|---|---|
java.util.List<java.io.File> |
declarations |
java.lang.String |
name
Name of resource
|
java.util.List<ResourceUsageModel.Resource> |
references
Resources this resource references.
|
com.android.resources.ResourceType |
type
Type of resource
|
int |
value
Integer id location
|
| Constructor and Description |
|---|
Resource(com.android.resources.ResourceType type,
java.lang.String name,
int value) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocation(java.io.File file) |
void |
addReference(ResourceUsageModel.Resource resource) |
int |
compareTo(ResourceUsageModel.Resource other) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getField() |
java.lang.String |
getUrl() |
int |
hashCode() |
boolean |
isDeclared()
Whether we found a declaration for this resource (otherwise we might have seen
a reference to this before we came across its potential declaration, so we added it
to the map, but we don't want to report unused resources for invalid resource
references
|
boolean |
isDiscard()
This resource is marked as to be ignored for usage analysis, regardless of lack of
references
|
boolean |
isKeep()
This resource is marked as to be ignored for usage analysis, regardless of
references
|
boolean |
isPublic()
This resource is marked as public
|
boolean |
isReachable() |
void |
setDeclared(boolean on)
Whether we found a declaration for this resource (otherwise we might have seen
a reference to this before we came across its potential declaration, so we added it
to the map, but we don't want to report unused resources for invalid resource
references
|
void |
setDiscard(boolean on)
This resource is marked as to be ignored for usage analysis, regardless of lack of
references
|
void |
setKeep(boolean on)
This resource is marked as to be ignored for usage analysis, regardless of
references
|
void |
setPublic(boolean on)
This resource is marked as public
|
void |
setReachable(boolean on) |
java.lang.String |
toString() |
public final com.android.resources.ResourceType type
public final java.lang.String name
public int value
public java.util.List<ResourceUsageModel.Resource> references
public java.util.List<java.io.File> declarations
public Resource(com.android.resources.ResourceType type,
java.lang.String name,
int value)
public boolean isDeclared()
public void setDeclared(boolean on)
public boolean isPublic()
public void setPublic(boolean on)
public boolean isKeep()
public void setKeep(boolean on)
public boolean isDiscard()
public void setDiscard(boolean on)
public boolean isReachable()
public void setReachable(boolean on)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void addLocation(@NonNull
java.io.File file)
public void addReference(@Nullable
ResourceUsageModel.Resource resource)
public java.lang.String getUrl()
public java.lang.String getField()
public int compareTo(@NonNull
ResourceUsageModel.Resource other)
compareTo in interface java.lang.Comparable<ResourceUsageModel.Resource>