Methods Summary |
---|
public void | addContents(DexFile file){@inheritDoc}
FieldIdsSection fieldIds = file.getFieldIds();
fieldIds.intern(field);
|
public int | compareTo(com.android.dx.dex.file.EncodedField other){@inheritDoc}
Note: This compares the method constants only,
ignoring any associated code, because it should never be the
case that two different items with the same method constant
ever appear in the same list (or same file, even).
return field.compareTo(other.field);
|
public void | debugPrint(java.io.PrintWriter out, boolean verbose){@inheritDoc}
// TODO: Maybe put something better here?
out.println(toString());
|
public int | encode(DexFile file, com.android.dx.util.AnnotatedOutput out, int lastIndex, int dumpSeq){@inheritDoc}
int fieldIdx = file.getFieldIds().indexOf(field);
int diff = fieldIdx - lastIndex;
int accessFlags = getAccessFlags();
if (out.annotates()) {
out.annotate(0, String.format(" [%x] %s", dumpSeq,
field.toHuman()));
out.annotate(Leb128.unsignedLeb128Size(diff),
" field_idx: " + Hex.u4(fieldIdx));
out.annotate(Leb128.unsignedLeb128Size(accessFlags),
" access_flags: " +
AccessFlags.fieldString(accessFlags));
}
out.writeUleb128(diff);
out.writeUleb128(accessFlags);
return fieldIdx;
|
public boolean | equals(java.lang.Object other){@inheritDoc}
if (! (other instanceof EncodedField)) {
return false;
}
return compareTo((EncodedField) other) == 0;
|
public com.android.dx.rop.cst.CstString | getName(){@inheritDoc}
return field.getNat().getName();
|
public com.android.dx.rop.cst.CstFieldRef | getRef()Gets the constant for the field.
return field;
|
public int | hashCode(){@inheritDoc}
return field.hashCode();
|
public java.lang.String | toHuman(){@inheritDoc}
return field.toHuman();
|
public java.lang.String | toString(){@inheritDoc}
StringBuffer sb = new StringBuffer(100);
sb.append(getClass().getName());
sb.append('{");
sb.append(Hex.u2(getAccessFlags()));
sb.append(' ");
sb.append(field);
sb.append('}");
return sb.toString();
|