summaryrefslogtreecommitdiff
path: root/runtime/dex_file.cc
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-01-19 10:35:47 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-01-19 10:35:48 +0000
commit9e8c8ca2d4c73d16d58d2375421d30a47df2f81c (patch)
tree5a8700a97ebc348050822fd2a67c3966af39600c /runtime/dex_file.cc
parentee64b4d83aca1874f78ee80f58ae61333d327436 (diff)
parent6c4921b3a13ab645045dd20e5386daf552a31f41 (diff)
Merge "ART: Improve class initializer and constructor verification."
Diffstat (limited to 'runtime/dex_file.cc')
-rw-r--r--runtime/dex_file.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index 7d704ad0cc..f59420d332 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -1274,6 +1274,16 @@ std::string Signature::ToString() const {
return result;
}
+uint32_t Signature::GetNumberOfParameters() const {
+ const DexFile::TypeList* params = dex_file_->GetProtoParameters(*proto_id_);
+ return (params != nullptr) ? params->Size() : 0;
+}
+
+bool Signature::IsVoid() const {
+ const char* return_type = dex_file_->GetReturnTypeDescriptor(*proto_id_);
+ return strcmp(return_type, "V") == 0;
+}
+
bool Signature::operator==(const StringPiece& rhs) const {
if (dex_file_ == nullptr) {
return false;