MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / FindClassDef

Method FindClassDef

Bcore/src/main/cpp/dex/dex_file.cc:206–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206const DexFile::ClassDef* DexFile::FindClassDef(dex::TypeIndex type_idx) const {
207 size_t num_class_defs = NumClassDefs();
208 // Fast path for rare no class defs case.
209 if (num_class_defs == 0) {
210 return nullptr;
211 }
212 for (size_t i = 0; i < num_class_defs; ++i) {
213 const ClassDef& class_def = GetClassDef(i);
214 if (class_def.class_idx_ == type_idx) {
215 return &class_def;
216 }
217 }
218 return nullptr;
219}
220
221uint32_t DexFile::FindCodeItemOffset(const DexFile::ClassDef& class_def,
222 uint32_t method_idx) const {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected