| 635 | } |
| 636 | |
| 637 | std::string Signature::ToString() const { |
| 638 | if (dex_file_ == nullptr) { |
| 639 | CHECK(proto_id_ == nullptr); |
| 640 | return "<no signature>"; |
| 641 | } |
| 642 | const DexFile::TypeList* params = dex_file_->GetProtoParameters(*proto_id_); |
| 643 | std::string result; |
| 644 | if (params == nullptr) { |
| 645 | result += "()"; |
| 646 | } else { |
| 647 | result += "("; |
| 648 | for (uint32_t i = 0; i < params->Size(); ++i) { |
| 649 | result += dex_file_->StringByTypeIdx(params->GetTypeItem(i).type_idx_); |
| 650 | } |
| 651 | result += ")"; |
| 652 | } |
| 653 | result += dex_file_->StringByTypeIdx(proto_id_->return_type_idx_); |
| 654 | return result; |
| 655 | } |
| 656 | |
| 657 | uint32_t Signature::GetNumberOfParameters() const { |
| 658 | const DexFile::TypeList* params = dex_file_->GetProtoParameters(*proto_id_); |
no test coverage detected