presto-client/src/main/java/io/prestosql/client/ClientTypeSignatureParameter.java/ClientTypeSignatureParameter/getValue
class ClientTypeSignatureParameter:    private <A> A getValue(ParameterKind expectedParameterKind, Class<A> target)
    {
        if (kind != expectedParameterKind) {
            throw new IllegalArgumentException(format("ParameterKind is [%s] but expected [%s]", kind, expectedParameterKind));
        }
        return target.cast(value);
    }