presto-spi/src/main/java/io/prestosql/spi/type/TypeSignatureParameter.java/TypeSignatureParameter/getTypeSignatureOrNamedTypeSignature
class TypeSignatureParameter:    public Optional<TypeSignature> getTypeSignatureOrNamedTypeSignature()
    {
        switch (kind) {
            case TYPE:
                return Optional.of(getTypeSignature());
            case NAMED_TYPE:
                return Optional.of(getNamedTypeSignature().getTypeSignature());
            default:
                return Optional.empty();
        }
    }