diff options
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index b49fc7494f..b97d99424e 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -457,6 +457,16 @@ ArtMethod* Class::FindDirectMethod( return nullptr; } +ArtMethod* Class::FindDeclaredDirectMethodByName(const StringPiece& name, size_t pointer_size) { + for (auto& method : GetDirectMethods(pointer_size)) { + ArtMethod* const np_method = method.GetInterfaceMethodIfProxy(pointer_size); + if (name == np_method->GetName()) { + return &method; + } + } + return nullptr; +} + // TODO These should maybe be changed to be named FindOwnedVirtualMethod or something similar // because they do not only find 'declared' methods and will return copied methods. This behavior is // desired and correct but the naming can lead to confusion because in the java language declared |