presto-main/src/main/java/io/prestosql/operator/aggregation/AggregationFromAnnotationsParser.java/AggregationFromAnnotationsParser/parseFunctionDefinitionWithTypesConstraint
class AggregationFromAnnotationsParser:    @VisibleForTesting
    public static ParametricAggregation parseFunctionDefinitionWithTypesConstraint(Class<?> clazz, TypeSignature returnType, List<TypeSignature> argumentTypes)
    {
        requireNonNull(returnType, "returnType is null");
        requireNonNull(argumentTypes, "argumentTypes is null");
        for (ParametricAggregation aggregation : parseFunctionDefinitions(clazz)) {
            Signature signature = aggregation.getFunctionMetadata().getSignature();
            if (signature.getReturnType().equals(returnType) &&
                    signature.getArgumentTypes().equals(argumentTypes)) {
                return aggregation;
            }
        }
        throw new IllegalArgumentException(format("No method with return type %s and arguments %s", returnType, argumentTypes));
    }