Transform an access flag field to the corresponding string

    :param value: the value of the access flags
    :type value: int

    :rtype: string
184247
def get_access_flags_string(value):
    
    flags = []
    for k, v in ACCESS_FLAGS.items():
        if (k & value) == k:
            flags.append(v)

    return " ".join(flags)
591211
def get_field_as(value, _as=None):
    
    if isinstance(value, MountedType):
        return value
    elif isinstance(value, UnmountedType):
        if _as is None:
            return value
        return _as.mounted(value)
386181
def show(self):
        
        bytecode._PrintSubBanner("Field Information")
        bytecode._PrintDefault("{}->{} {} [access_flags={}]\n".format(
            self.get_class_name(), self.get_name(), self.get_descriptor(),
            self.get_access_flags_string()))

        init_value = self.get_init_value()
        if init_value is not None:
            bytecode._PrintDefault("\tinit value: %s\n" %
                                   str(init_value.get_value()))
436307
def get_value(self, value):
        
        next_key = ":v%d" % self._next_value
        self._next_value += 1
        self._values[next_key] = value
        return next_key
616135
def get_prep_value(self, value):
		
		if value is None or value == "":
			return None
		if isinstance(value, six.string_types):
			value = _hex_string_to_unsigned_integer(value)
		if _using_signed_storage():
			value = _unsigned_to_signed_integer(value)
		return value
883477
def _to_int(value_str, min_value, rep_digit, field_name, dtarg):
        
        if '*' in value_str:
            first = value_str.index('*')
            after = value_str.rindex('*') + 1
            if value_str[first:after] != '*' * (after - first):
                raise ValueError(
                    _format("Asterisks in {0} field of CIM datetime value "
                            "{1!A} are not consecutive: {2!A}",
                            field_name, dtarg, value_str))
            if after != len(value_str):
                raise ValueError(
                    _format("Asterisks in {0} field of CIM datetime value "
                            "{1!A} do not end at end of field: {2!A}",
                            field_name, dtarg, value_str))
            if rep_digit is None:  # pylint: disable=no-else-return
                # Must be an all-asterisk field
                if first != 0:
                    raise ValueError(
                        _format("Asterisks in {0} field of CIM datetime value "
                                "{1!A} do not start at begin of field: {2!A}",
                                field_name, dtarg, value_str))
                return min_value
            else:
                value_str = value_str.replace('*', rep_digit)
        # Because the pattern and the asterisk replacement mechanism already
        # ensure only decimal digits, we expect the integer conversion to
        # always succeed.
        value = int(value_str)
        return value
1339231
def value_to_string(self, obj):
        
        value = self.value_from_object(obj)
        return self.get_prep_value(value)
296633
def ConvertToWireFormat(self, value):
    
    output = _SerializeEntries(
        (python_format, wire_format, value.type_descriptor)
        for (python_format, wire_format) in value.wrapped_list)
    return b"", b"", output
965949
def serialize(self, value, **kwargs):
        
        if self._serialize is not None:
            return self._serialize(value, **kwargs)
        else:
            return value
740397
def transform(self, value, **kwargs):
        
        if value is None:
            return None

        objid = id(value)
        if objid in self.context:
            return '<...>'
        self.context.add(objid)

        try:
            for serializer in self.serializers:
                try:
                    if serializer.can(value):
                        return serializer.serialize(value, **kwargs)
                except Exception as e:
                    logger.exception(e)
                    return text_type(type(value))

            # if all else fails, lets use the repr of the object
            try:
                return repr(value)
            except Exception as e:
                logger.exception(e)
                # It's common case that a model's __unicode__ definition
                # may try to query the database which if it was not
                # cleaned up correctly, would hit a transaction aborted
                # exception
                return text_type(type(value))
        finally:
            self.context.remove(objid)
726023
def localize_field(self, value):
        
        if self.default is not None:
            if value is None or value == '':
                value = self.default
        return value or ''
1225930
def _value_format(self, value):
        
        return '%s: %s' % (
            self.area_names.get(self.adapt_code(value[0]), '?'),
            self._y_format(value[1])
        )
693800
def value_to_db(self, value):
        
        assert isinstance(value, six.integer_types)
        return str(value).encode("utf_8")
907598
def _value(self):
        """"""
        if self.data is not None:
            value = self.data._data.get(self.field.to_field.name)
            return str(value)
        return ''
635279
def _asString(self, value):
        """"""
        if sys.version_info[0] == 3:
            if isinstance(value, str):
                return value
            elif isinstance(value, bytes):
                return value.decode('utf-8')
        elif sys.version_info[0] == 2:
            return value.encode('ascii')
680970
def to_string_with_default(value, default_value):
        
        result = StringConverter.to_nullable_string(value)
        return result if result != None else default_value
1054898
def convert_field_value(type_, value):
    """"""
    if value == ".":
        return None
    elif type_ in ("Character", "String"):
        if "%" in value:
            for k, v in record.UNESCAPE_MAPPING:
                value = value.replace(k, v)
        return value
    else:
        try:
            return _CONVERTERS[type_](value)
        except ValueError:
            warnings.warn(
                ("{} cannot be converted to {}, keeping as " "string.").format(value, type_),
                CannotConvertValue,
            )
            return value