summaryrefslogtreecommitdiff
path: root/runtime/method_helper-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/method_helper-inl.h')
-rw-r--r--runtime/method_helper-inl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/method_helper-inl.h b/runtime/method_helper-inl.h
index 42a60896a0..4f95a28e81 100644
--- a/runtime/method_helper-inl.h
+++ b/runtime/method_helper-inl.h
@@ -19,7 +19,10 @@
#include "method_helper.h"
+#include "class_linker.h"
+#include "mirror/object_array.h"
#include "runtime.h"
+#include "thread-inl.h"
namespace art {
@@ -33,6 +36,15 @@ inline mirror::Class* MethodHelper::GetClassFromTypeIdx(uint16_t type_idx, bool
return type;
}
+inline mirror::Class* MethodHelper::GetReturnType(bool resolve) {
+ mirror::ArtMethod* method = GetMethod();
+ const DexFile* dex_file = method->GetDexFile();
+ const DexFile::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex());
+ const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id);
+ uint16_t return_type_idx = proto_id.return_type_idx_;
+ return GetClassFromTypeIdx(return_type_idx, resolve);
+}
+
inline mirror::String* MethodHelper::ResolveString(uint32_t string_idx) {
mirror::ArtMethod* method = GetMethod();
mirror::String* s = method->GetDexCacheStrings()->Get(string_idx);