Sets values of some (all) object properties.

        If some properties do not exist or introspection fails
        they are just silently skipped and no errors thrown.

        :param obj: an object to write properties to.

        :param values: a map, containing property names and their values.

def set_properties(obj, values):
        """
        Sets values of some (all) object properties.

        If some properties do not exist or introspection fails
        they are just silently skipped and no errors thrown.

        :param obj: an object to write properties to.

        :param values: a map, containing property names and their values.
        """
        if values == None or len(values) == 0:
            return

        for (name, value) in values:
            PropertyReflector.set_property(obj, name, value)