getMethodBySignature abstract method
Gets a method by its name and parameter types.
Parameters:
name
: The method nameparameterTypes
: List of parameter types in exact order
Returns:
- The exact method match if found
null
if no matching signature exists
Example:
class Converter {
String convert(int value) => value.toString();
String convert(double value) => value.toString();
}
final method = Class.forType<Converter>()
.getMethodBySignature('convert', [Class.forType<int>()]);
Implementation
Method? getMethodBySignature(String name, List<Class> parameterTypes);