diff options
Diffstat (limited to 'runtime/mirror/art_method.cc')
| -rw-r--r-- | runtime/mirror/art_method.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc index ddc16fb5e2..acd104383c 100644 --- a/runtime/mirror/art_method.cc +++ b/runtime/mirror/art_method.cc @@ -67,6 +67,17 @@ void ArtMethod::VisitRoots(RootCallback* callback, void* arg) { } } +mirror::String* ArtMethod::GetNameAsString(Thread* self) { + mirror::ArtMethod* method = GetInterfaceMethodIfProxy(); + const DexFile* dex_file = method->GetDexFile(); + uint32_t dex_method_idx = method->GetDexMethodIndex(); + const DexFile::MethodId& method_id = dex_file->GetMethodId(dex_method_idx); + StackHandleScope<1> hs(self); + Handle<mirror::DexCache> dex_cache(hs.NewHandle(method->GetDexCache())); + return Runtime::Current()->GetClassLinker()->ResolveString(*dex_file, method_id.name_idx_, + dex_cache); +} + InvokeType ArtMethod::GetInvokeType() { // TODO: kSuper? if (GetDeclaringClass()->IsInterface()) { |