| 601 | } |
| 602 | |
| 603 | std::string DexFile::PrettyField(uint32_t field_idx, bool with_type) const { |
| 604 | if (field_idx >= NumFieldIds()) { |
| 605 | return StringPrintf("<<invalid-field-idx-%d>>", field_idx); |
| 606 | } |
| 607 | const DexFile::FieldId& field_id = GetFieldId(field_idx); |
| 608 | std::string result; |
| 609 | if (with_type) { |
| 610 | result += GetFieldTypeDescriptor(field_id); |
| 611 | result += ' '; |
| 612 | } |
| 613 | AppendPrettyDescriptor(GetFieldDeclaringClassDescriptor(field_id), &result); |
| 614 | result += '.'; |
| 615 | result += GetFieldName(field_id); |
| 616 | return result; |
| 617 | } |
| 618 | |
| 619 | std::string DexFile::PrettyType(dex::TypeIndex type_idx) const { |
| 620 | if (type_idx.index_ >= NumTypeIds()) { |
no test coverage detected