| 219 | } |
| 220 | |
| 221 | uint32_t DexFile::FindCodeItemOffset(const DexFile::ClassDef& class_def, |
| 222 | uint32_t method_idx) const { |
| 223 | const uint8_t* class_data = GetClassData(class_def); |
| 224 | CHECK(class_data != nullptr); |
| 225 | ClassDataItemIterator it(*this, class_data); |
| 226 | it.SkipAllFields(); |
| 227 | while (it.HasNextDirectMethod()) { |
| 228 | if (it.GetMemberIndex() == method_idx) { |
| 229 | return it.GetMethodCodeItemOffset(); |
| 230 | } |
| 231 | it.Next(); |
| 232 | } |
| 233 | while (it.HasNextVirtualMethod()) { |
| 234 | if (it.GetMemberIndex() == method_idx) { |
| 235 | return it.GetMethodCodeItemOffset(); |
| 236 | } |
| 237 | it.Next(); |
| 238 | } |
| 239 | LOG(FATAL) << "Unable to find method " << method_idx; |
| 240 | UNREACHABLE(); |
| 241 | } |
| 242 | |
| 243 | const DexFile::FieldId* DexFile::FindFieldId(const DexFile::TypeId& declaring_klass, |
| 244 | const DexFile::StringId& name, |
nothing calls this directly
no test coverage detected