private static boolean hasTypeDef(FieldValueMetaData valueMetadata) {
        while (true) {
            if (valueMetadata.isTypedef()) {
                return true;
            }

            if (valueMetadata instanceof ListMetaData) {
                valueMetadata = ((ListMetaData) valueMetadata).elemMetaData;
                continue;
            }

            if (valueMetadata instanceof SetMetaData) {
                valueMetadata = ((SetMetaData) valueMetadata).elemMetaData;
                continue;
            }

            if (valueMetadata instanceof MapMetaData) {
                return hasTypeDef(((MapMetaData) valueMetadata).keyMetaData) ||
                       hasTypeDef(((MapMetaData) valueMetadata).valueMetaData);
            }

            return false;
        }
    }
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