Get method signatures from IBase.hal

instead of hardcoding them in hidl-gen.

Test: hidl_test

Bug: 32559427

Change-Id: Ib0d3beca695fca47eb5f82d5d54c651da9af3687
diff --git a/Method.cpp b/Method.cpp
index e41ebd0..38a6c04 100644
--- a/Method.cpp
+++ b/Method.cpp
@@ -37,24 +37,16 @@
       mAnnotations(annotations) {
 }
 
-// HIDL reserved methods.
-Method::Method(const char *name,
-       std::vector<TypedVar *> *args,
-       std::vector<TypedVar *> *results,
-       bool oneway,
-       std::vector<Annotation *> *annotations,
-       size_t serial,
-       MethodImpl cppImpl,
-       MethodImpl javaImpl)
-    : Method(name, args, results, oneway, annotations) {
-
+void Method::fillImplementation(
+        size_t serial,
+        MethodImpl cppImpl,
+        MethodImpl javaImpl) {
     mIsHidlReserved = true;
     mSerial = serial;
     mCppImpl = cppImpl;
     mJavaImpl = javaImpl;
 }
 
-
 std::string Method::name() const {
     return mName;
 }
@@ -101,6 +93,10 @@
     return mJavaImpl.find(type) != mJavaImpl.end();
 }
 
+Method *Method::copySignature() const {
+    return new Method(mName.c_str(), mArgs, mResults, mOneway, mAnnotations);
+}
+
 void Method::setSerialId(size_t serial) {
     CHECK(!mIsHidlReserved);
     mSerial = serial;