Current the method signature is set with current plain text, which is not so good to maintain and read like "(J[J[II[B)V" and confusing for onboarding and in maintenance.
The signature is generated by the parameter type list and the return value type.
A better way is like below :
Build a map from type, which is via typeid in cpp, to signature
Create a method to generate the signature by the parameters type list and return type
Update the getMethodIdOrError from current signature to the parameter list and return type and call the method above
To make the above more readable and a better comprehensibility and encapsulation, we can declare a series variables to show the detailed meaning and pass it to the getMethodIdOrError.
A good example is splitResultConstructor, which seems not matched with java definition.
There are 6 long variables in its java code, while the signature contains 7.
Description
Current the method signature is set with current plain text, which is not so good to maintain and read like "(J[J[II[B)V" and confusing for onboarding and in maintenance. The signature is generated by the parameter type list and the return value type. A better way is like below :
typeid
in cpp, to signaturegetMethodIdOrError
from current signature to the parameter list and return type and call the method abovegetMethodIdOrError
.