@Override
    public Object newClientStub(Class<?> clientType, Channel channel) {
        Constructor<?> constructor = null;

        for (Constructor<?> ctor : clientType.getConstructors()) {
            final Class<?>[] methodParameterTypes = ctor.getParameterTypes();
            if (methodParameterTypes.length == 1 && methodParameterTypes[0] == Channel.class) {
                // Must have a single `Channel` parameter.
                constructor = ctor;
                break;
            }
        }

        if (constructor == null) {
            throw new IllegalStateException(
                    "Could not find a constructor on a gRPC Kotlin client stub: " + clientType.getName());
        }

        try {
            return constructor.newInstance(channel);
        } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
            throw newClientStubCreationException(e);
        }
    }
A gRPC client stub factory for <a href="https://github.com/grpc/grpc-kotlin">gRPC-Kotlin</a>.
grpc/src/main/java/com/linecorp/armeria/internal/client/grpc/KotlinGrpcClientStubFactory.java