@Nullable
    public static <T> T unwrap(Object client, Class<T> type) {
        final ClientBuilderParams params = ClientFactory.ofDefault().clientBuilderParams(client);
        if (params == null) {
            return null;
        }

        return params.options().factory().unwrap(client, type);
    }
Unwraps the specified client into the object of the specified {@code type}.
Use this method instead of an explicit downcast. For example:
<pre>{@code
WebClient client = WebClient.builder(...)
                            .decorator(LoggingClient.newDecorator())
                            .build();

LoggingClient unwrapped = Clients.unwrap(client, LoggingClient.class);

// If the client implements Unwrappable, you can just use the 'as()' method.
LoggingClient unwrapped2 = client.as(LoggingClient.class);
}</pre>

@param type the type of the object to return
@return the object of the specified {@code type} if found, or {@code null} if not found.

@see Client#as(Class)
@see ClientFactory#unwrap(Object, Class)
@see Unwrappable
core/src/main/java/com/linecorp/armeria/client/Clients.java