diff options
| author | 2017-01-19 10:35:47 +0000 | |
|---|---|---|
| committer | 2017-01-19 10:35:48 +0000 | |
| commit | 9e8c8ca2d4c73d16d58d2375421d30a47df2f81c (patch) | |
| tree | 5a8700a97ebc348050822fd2a67c3966af39600c /runtime/dex_file.cc | |
| parent | ee64b4d83aca1874f78ee80f58ae61333d327436 (diff) | |
| parent | 6c4921b3a13ab645045dd20e5386daf552a31f41 (diff) | |
Merge "ART: Improve class initializer and constructor verification."
Diffstat (limited to 'runtime/dex_file.cc')
| -rw-r--r-- | runtime/dex_file.cc | 10 |
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; |