public <T> T build(Class<T> clientType) {
        requireNonNull(clientType, "clientType");

        final Object client;
        final ClientOptions options = buildOptions();
        final ClientFactory factory = options.factory();
        if (uri != null) {
            client = factory.newClient(ClientBuilderParams.of(uri, clientType, options));
        } else {
            assert endpointGroup != null;
            client = factory.newClient(ClientBuilderParams.of(scheme, endpointGroup,
                                                              path, clientType, options));
        }

        @SuppressWarnings("unchecked")
        final T cast = (T) client;
        return cast;
    }
Returns a newly-created client which implements the specified {@code clientType}, based on the
properties of this builder.

@throws IllegalArgumentException if the scheme of the {@code uri} specified in
                                 {@link Clients#builder(String)} or the specified {@code clientType} is
                                 unsupported for the scheme
core/src/main/java/com/linecorp/armeria/client/ClientBuilder.java