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