diff options
| author | 2015-08-25 21:33:38 +0000 | |
|---|---|---|
| committer | 2015-08-25 21:33:38 +0000 | |
| commit | b5f7abcdef9aec80e67b581a9bcc0de39e98fc85 (patch) | |
| tree | 387724eebfe7cd0f7be368e64b22af3894eea4c7 /runtime/mirror/class.cc | |
| parent | dda43e7e9680e6eead02876e67718d01837d89e0 (diff) | |
| parent | 13e748b28c5f2bd1e83674d2ca899ff61ae5c0a1 (diff) | |
Merge "Revert "Revert "Move annotations to native."""
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 3bea978974..bed26b2813 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -511,6 +511,16 @@ ArtMethod* Class::FindDeclaredVirtualMethod(const DexCache* dex_cache, uint32_t return nullptr; } +ArtMethod* Class::FindDeclaredVirtualMethodByName(const StringPiece& name, size_t pointer_size) { + for (auto& method : GetVirtualMethods(pointer_size)) { + ArtMethod* const np_method = method.GetInterfaceMethodIfProxy(pointer_size); + if (name == np_method->GetName()) { + return &method; + } + } + return nullptr; +} + ArtMethod* Class::FindVirtualMethod( const StringPiece& name, const StringPiece& signature, size_t pointer_size) { for (Class* klass = this; klass != nullptr; klass = klass->GetSuperClass()) { |