public abstract class DataBindingResourceItem
extends java.lang.Object
| Constructor and Description |
|---|
DataBindingResourceItem(java.lang.String name,
DataBindingResourceType type)
Constructs the object with a name, type and optional value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.io.File |
getFile()
For non-values resources, this is the original source file.
|
java.lang.String |
getKey()
Returns the key for this item.
|
java.lang.String |
getName()
Returns the name of the item.
|
F |
getSource()
Returns the DataFile the item is coming from.
|
protected int |
getStatus()
Obtains the full status of the data item; should not generally be used except
for debug purposes.
|
DataBindingResourceType |
getType() |
int |
hashCode() |
void |
setSource(F sourceFile)
Sets the DataFile.
|
java.lang.String |
toString() |
protected void |
wasTouched()
Hook invoked when the data item has been touched.
|
public DataBindingResourceItem(@NonNull
java.lang.String name,
@NonNull
DataBindingResourceType type)
Note that the object is not fully usable as-is. It must be added to a DataFile first.
name - the name of the item@NonNull public DataBindingResourceType getType()
public boolean equals(java.lang.Object o)
public int hashCode()
@NonNull public java.lang.String getName()
@Nullable public F getSource()
public void setSource(@Nullable
F sourceFile)
sourceFile - the data file, if null then the item is marked as being removed from the
data fileprotected int getStatus()
public java.lang.String getKey()
protected void wasTouched()
@Nullable public java.io.File getFile()
GeneratedResourceItem overrides it.public java.lang.String toString()
toString in class java.lang.Object