Methods Summary |
---|
public void | addContents(DexFile file){@inheritDoc}
if (data == null) {
// The string data hasn't yet been added, so add it.
MixedItemSection stringData = file.getStringData();
data = new StringDataItem(value);
stringData.add(data);
}
|
public int | compareTo(java.lang.Object other){@inheritDoc}
StringIdItem otherString = (StringIdItem) other;
return value.compareTo(otherString.value);
|
public boolean | equals(java.lang.Object other){@inheritDoc}
if (!(other instanceof StringIdItem)) {
return false;
}
StringIdItem otherString = (StringIdItem) other;
return value.equals(otherString.value);
|
public StringDataItem | getData()Gets the associated data object for this instance, if known.
return data;
|
public com.android.dx.rop.cst.CstString | getValue()Gets the string value.
return value;
|
public int | hashCode(){@inheritDoc}
return value.hashCode();
|
public ItemType | itemType(){@inheritDoc}
return ItemType.TYPE_STRING_ID_ITEM;
|
public int | writeSize(){@inheritDoc}
return SizeOf.STRING_ID_ITEM;
|
public void | writeTo(DexFile file, com.android.dx.util.AnnotatedOutput out){@inheritDoc}
int dataOff = data.getAbsoluteOffset();
if (out.annotates()) {
out.annotate(0, indexString() + ' " + value.toQuoted(100));
out.annotate(4, " string_data_off: " + Hex.u4(dataOff));
}
out.writeInt(dataOff);
|