ART: Fixes for constructor parameter annotations

Synthesize empty parameter annotations for implicit parameters on
constructors. Reflective methods for recovering parameter annotations
expect them to be present though they may not be present in the DEX file.

Bug: b/68033708
Test: art/test/run-test --host 715

Change-Id: I0827c7e71ff7c7e044fc9dd6c5aac639a0e1a4c6
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index 145eb67..9276994 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -295,6 +295,11 @@
   return GetDexFile()->GetClassDef(GetClassDefIndex());
 }
 
+inline size_t ArtMethod::GetNumberOfParameters() {
+  constexpr size_t return_type_count = 1u;
+  return strlen(GetShorty()) - return_type_count;
+}
+
 inline const char* ArtMethod::GetReturnTypeDescriptor() {
   DCHECK(!IsProxyMethod());
   const DexFile* dex_file = GetDexFile();