static TypeSignature toTypeSignature(FieldValueMetaData fieldValueMetaData) {
        if (fieldValueMetaData instanceof StructMetaData) {
            return TypeSignature.ofStruct(((StructMetaData) fieldValueMetaData).structClass);
        }

        if (fieldValueMetaData instanceof EnumMetaData) {
            return TypeSignature.ofEnum(((EnumMetaData) fieldValueMetaData).enumClass);
        }

        if (fieldValueMetaData instanceof ListMetaData) {
            return TypeSignature.ofList(toTypeSignature(((ListMetaData) fieldValueMetaData).elemMetaData));
        }

        if (fieldValueMetaData instanceof SetMetaData) {
            return TypeSignature.ofSet(toTypeSignature(((SetMetaData) fieldValueMetaData).elemMetaData));
        }

        if (fieldValueMetaData instanceof MapMetaData) {
            final MapMetaData mapMetaData = (MapMetaData) fieldValueMetaData;
            return TypeSignature.ofMap(toTypeSignature(mapMetaData.keyMetaData),
                                       toTypeSignature(mapMetaData.valueMetaData));
        }

        if (fieldValueMetaData.isBinary()) {
            return BINARY;
        }

        switch (fieldValueMetaData.type) {
            case TType.VOID:
                return VOID;
            case TType.BOOL:
                return BOOL;
            case TType.BYTE:
                return I8;
            case TType.DOUBLE:
                return DOUBLE;
            case TType.I16:
                return I16;
            case TType.I32:
                return I32;
            case TType.I64:
                return I64;
            case TType.STRING:
                return STRING;
        }
        return TypeSignature.ofUnresolved("unknown");
    }
A {@link DescriptiveTypeInfoProvider} to create a {@link DescriptiveTypeInfo} from a Thrift type
such as {@link TBase} {@link TEnum} or {@link TException}.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/internal/server/thrift/ThriftDescriptiveTypeInfoProvider.java