serializes `name` property value and updates the corresponding attribute note that reflection is opt-in.
422306
function(name) {
      var inferredType = typeof this[name];
      // try to intelligently serialize property value
      var serializedValue = this.serializeValue(this[name], inferredType);
      // boolean properties must reflect as boolean attributes
      if (serializedValue !== undefined) {
        this.setAttribute(name, serializedValue);
        // TODO(sorvell): we should remove attr for all properties
        // that have undefined serialization; however, we will need to
        // refine the attr reflection system to achieve this; pica, for example,
        // relies on having inferredType object properties not removed as
        // attrs.
      } else if (inferredType === 'boolean') {
        this.removeAttribute(name);
      }
    }
451713
private void updateAttributes(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException
   {
      String name = request.getParameter("name");

      if (trace)
         log.trace("updateAttributes, name=" + name);

      Enumeration paramNames = request.getParameterNames();
      HashMap<String, String> attributes = new HashMap<String, String>();

      while (paramNames.hasMoreElements())
      {
         String param = (String)paramNames.nextElement();

         if (param.equals("name") || param.equals("action"))
            continue;

         String value = request.getParameter(param);

         if (trace)
            log.trace("name=" + param + ", value='" + value + "'");

         // Ignore null values, these are empty write-only fields
         if (value == null || value.length() == 0)
            continue;

         attributes.put(param, value);
      }

      try
      {
         AttributeList newAttributes = setAttributes(name, attributes);
         MBeanData data = getMBeanData(name);
         request.setAttribute("mbeanData", data);

         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/inspectmbean.jsp");
         rd.forward(request, response);
      }
      catch (Exception e)
      {
         throw new ServletException("Failed to update attributes", e);
      }
   }
1374097
def Serialize(self, val, info):
      
      self._Serialize(val, info, self.defaultNS)
1236018
def write_attribute(name, value)
      name = name.to_s
      modify(name, @attributes[name], value)
    end
1258940
private void buildAttributeValueObject(final String name) {
	attrval.name = name;
	attrval.quality = AttrQuality.ATTR_VALID;
	attrval.time = new TimeVal();
	attrval.r_dim = new AttributeDim();
	attrval.w_dim = new AttributeDim();
	attrval.r_dim.dim_x = 1;
	attrval.r_dim.dim_y = 0;
	attrval.w_dim.dim_x = 0;
	attrval.w_dim.dim_y = 0;
	try {
	    attrval.value = ApiUtil.get_orb().create_any();
	} catch (final DevFailed e) {
	}

	final long now = System.currentTimeMillis();
	attrval.time.tv_sec = (int) (now / 1000);
	attrval.time.tv_usec = (int) (now - attrval.time.tv_sec * 1000) * 1000;
	attrval.time.tv_nsec = 0;
	attrval.err_list = null;
    }
111552
private static void copyProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException {
        PropertyDescriptor propDescriptor;
        try {
            propDescriptor =
                PropertyUtils.getPropertyDescriptor(bean, name);
        } catch (NoSuchMethodException e) {
            propDescriptor = null;
        }
        if ((propDescriptor != null) &&
            (propDescriptor.getWriteMethod() == null)) {
            propDescriptor = null;
        }
        if (propDescriptor != null) {
            Converter converter = Stapler.lookupConverter(propDescriptor.getPropertyType());
            if (converter != null)
                value = converter.convert(propDescriptor.getPropertyType(), value);
            try {
                PropertyUtils.setSimpleProperty(bean, name, value);
            } catch (NoSuchMethodException e) {
                throw new NoSuchMethodError(e.getMessage());
            }
            return;
        }

        // try a field
        try {
            Field field = bean.getClass().getField(name);
            Converter converter = ConvertUtils.lookup(field.getType());
            if (converter != null)
                value = converter.convert(field.getType(), value);
            field.set(bean,value);
        } catch (NoSuchFieldException e) {
            // no such field
        }
    }
756263
private static boolean setName(String ns, String name, Schema property) {
        boolean apply = false;
        final String cleanName = StringUtils.trimToNull(name);
        final String useName;
        if (!isEmpty(cleanName) && !cleanName.equals(((SchemaImpl) property).getName())) {
            useName = cleanName;
            apply = true;
        } else {
            useName = null;
        }
        final String cleanNS = StringUtils.trimToNull(ns);
        final String useNS;
        if (!isEmpty(cleanNS)) {
            useNS = cleanNS;
            apply = true;
        } else {
            useNS = null;
        }
        // Set everything or nothing
        if (apply) {
            getXml(property).name(useName).namespace(useNS);
        }
        return apply;
    }
886856
def serialize(self, value, **kwargs):
        
        kwargs.update({'include_class': kwargs.get('include_class', True)})
        if self.serializer is not None:
            return self.serializer(value, **kwargs)
        if value is None:
            return None
        if isinstance(value, HasProperties):
            return value.serialize(**kwargs)
        return self.to_json(value, **kwargs)
1064709
def _serialize(self, value, key, obj):
        
        param_values = {}
        for name, attr_tpl in iteritems(self.params):
            attr_name = _tpl(str(attr_tpl))
            if attr_name:
                attribute_value = _get_value(obj, attr_name, default=missing)
                if attribute_value is None:
                    return None
                if attribute_value is not missing:
                    param_values[name] = attribute_value
                else:
                    raise AttributeError(
                        "{attr_name!r} is not a valid "
                        "attribute of {obj!r}".format(attr_name=attr_name, obj=obj)
                    )
            else:
                param_values[name] = attr_tpl
        return url_for(self.endpoint, **param_values)
800829
def _serialize_property_value(self, to_serialize: Any, serializer_cls: Type) -> Any:
        
        serializer = self._create_serializer_of_type_with_cache(serializer_cls)
        assert serializer is not None
        return serializer.serialize(to_serialize)
431038
def set(attribute_name, value, &block)
      # Assign, without the =
      attribute_name = attribute_name.to_sym

      check_valid_field_name(attribute_name)

      old_value = @attributes[attribute_name]
      new_value = wrap_value(value, [attribute_name])

      if old_value != new_value
        # Track the old value, skip if we are in no_validate
        attribute_will_change!(attribute_name, old_value) unless Volt.in_mode?(:no_change_tracking)

        # Assign the new value
        @attributes[attribute_name] = new_value

        @deps.changed!(attribute_name)

        @size_dep.changed! if old_value.nil? || new_value.nil?

        # TODO: Can we make this so it doesn't need to be handled for non store collections
        # (maybe move it to persistor, though thats weird since buffers don't have a persistor)
        clear_server_errors(attribute_name) if @server_errors.present?

        # Save the changes
        run_changed(attribute_name) unless Volt.in_mode?(:no_change_tracking)
      end

      new_value
    end
1156435
private Chunk setAttribute(String name, Object obj) {
		if (attributes == null)
			attributes = new HashMap();
		attributes.put(name, obj);
		return this;
	}
1157902
private void updateVertexProperty(AtlasVertex vertex, String propertyName, String newValue) {
        if (StringUtils.isNotBlank(newValue)) {
            String currValue = vertex.getProperty(propertyName, String.class);

            if (!StringUtils.equals(currValue, newValue)) {
                vertex.setProperty(propertyName, newValue);
            }
        }
    }
626185
def update_value(self, name, value):
        
        if name not in {'id', self.SERVICE_ENDPOINT, self.CONSUME_ENDPOINT, 'type'}:
            self._values[name] = value
854877
public void updateValue()
    {
        try
        {
            Method method = m_propertyMetadata.getSetMethod();
            //Object convertedValue = ValidationUtils.convertTo(getClazz(), m_currentValue);
            if (m_currentValue == null && method.getParameterTypes()[0].isPrimitive())
            {
                method.invoke(m_proxyObject.getObject(), ConvertUtils.getPrimitiveTypeForNull(method.getParameterTypes()[0]));
            }
            else
            {
                method.invoke(m_proxyObject.getObject(), m_currentValue);
            }
            m_useCurrentValue = false;
            m_notKnown = false;
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
768060
@Override
    public synchronized Object setAttribute(Object name, Object value, Boolean newIsListener) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINER)) {
            StringBuffer sb = new StringBuffer("{").append(name).append(",");
            if (!SessionManagerConfig.isHideSessionValues()) {
                sb.append(value).append(",");
            }
            sb.append(newIsListener).append("} ").append(appNameAndIdString);
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[SET_ATTRIBUTE], sb.toString());
        }
        Object oldValue = _attributes.put(name, value);
        Boolean oldIsListener = (Boolean) _attributeNames.put(name, newIsListener);
        _storeCallback.sessionAttributeSet(this, name, oldValue, oldIsListener, value, newIsListener);
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            if (!SessionManagerConfig.isHideSessionValues()) {
                LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[SET_ATTRIBUTE], oldValue);
            } else {
                LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[SET_ATTRIBUTE]);
            }
        }
        return oldValue;
    }
1096448
public void setProperty(String name, Object value) throws IllegalArgumentException, IllegalStateException {
		if (name == null) {
			throw new IllegalArgumentException("property name can not be null");
		}
		if (PROPERTY_SERIALIZER_INDENTATION.equals(name)) {
			indentationString = (String) value;
		} else if (PROPERTY_SERIALIZER_LINE_SEPARATOR.equals(name)) {
			lineSeparator = (String) value;
		} else if (PROPERTY_LOCATION.equals(name)) {
			location = (String) value;
		} else {
			throw new IllegalStateException("unsupported property " + name);
		}
		writeLineSepartor = lineSeparator != null && lineSeparator.length() > 0;
		writeIndentation = indentationString != null && indentationString.length() > 0;
		// optimize - do not write when nothing to write ...
		doIndent = indentationString != null && (writeLineSepartor || writeIndentation);
		// NOTE: when indentationString == null there is no indentation
		// (even though writeLineSeparator may be true ...)
		rebuildIndentationBuf();
		seenTag = false; // for consistency
	}