Sets a value for a property in a remote object.
@param objRef The remote object reference.
@param property The name of the property.
@param value The new property value.
481661
public void setPropertyValue(final JsiiObjectRef objRef, final String property, final JsonNode value) {
        ObjectNode req = makeRequest("set", objRef);
        req.put("property", property);
        req.set("value", value);

        this.runtime.requestResponse(req);
    }
949449
public synchronized void setProperty(String name, Object value) {
        if (!(value instanceof Serializable)) {
            throw new IllegalArgumentException("Value must be serializable");
        }
        properties.put(name, value);
    }
803482
public void setProperty(final String property, final Object newValue) {
        if (property.startsWith("@")) {
            if (newValue instanceof String || newValue instanceof GString) {
                final Iterator iter = iterator();

                while (iter.hasNext()) {
                    final NodeChild child = (NodeChild) iter.next();

                    child.attributes().put(property.substring(1), newValue);
                }
            }
        } else {
            final GPathResult result = new NodeChildren(this, property, this.namespaceTagHints);

            if (newValue instanceof Map) {
                for (Object o : ((Map) newValue).entrySet()) {
                    final Map.Entry entry = (Map.Entry) o;
                    result.setProperty("@" + entry.getKey(), entry.getValue());
                }
            } else {
                if (newValue instanceof Closure) {
                    result.replaceNode((Closure) newValue);
                } else {
                    result.replaceBody(newValue);
                }
            }
        }
    }
1271043
private void setProperty(ACModelProperty property, Object value) {
        props.setProperty(property.toString(), value.toString());
    }
385560
public void setValueFor(Field target, Object value) {
        if(value == null && target.getType().isPrimitive()) {
            throw new ND4JIllegalStateException("Unable to set primitive field " + target + " of type " + target.getClass()
                    + " using null value!");
        }

        if(value != null) {
            value = ensureProperType(target, value);
        }

        if(isConfigProperties()){
            String propertyName = configFieldName();
            if(propertyName == null)
                propertyName = "config";
            Field f = null;
            Class<?> currClass = getClass();
            try{
                f = currClass.getDeclaredField(propertyName);
            } catch (NoSuchFieldException e){
                //OK, try superclass
            }
            while(f == null && currClass.getSuperclass() != null){
                currClass = currClass.getSuperclass();
                try{
                    f = currClass.getDeclaredField(propertyName);
                } catch (NoSuchFieldException e){
                    //OK, try superclass
                }
            }

            if(f == null){
                throw new IllegalStateException("Could not find field \"" + propertyName + "\" for class " + getClass().getName());
            }

            try {
                f.setAccessible(true);
                Object o = f.get(this);
                if(o == null){
                    //Null config class - try to create one...
                    Class<?> c = f.getType();
                    try {
                        o = c.newInstance();
                    } catch (InstantiationException e){
                        throw new RuntimeException("Error creating new instance of configuration object type " + c.getName(), e);
                    }
                    f.set(this, o);
                }
                target.set(o, value);
            } catch (IllegalAccessException e){
                throw new RuntimeException("Error setting configuration field \"" + propertyName + "\" for config field \"" + propertyName
                    + "\" on class " + getClass().getName());
            }

        } else {
            try {
                target.set(this,value);
            } catch (IllegalAccessException e) {
                throw new RuntimeException("Error setting property for function " + getClass().getName(), e);
            }
        }
    }
491787
public static void invokeSetter(Object obj, String propertyName, Object value) {
		Method method = getSetterMethod(obj.getClass(), propertyName, value.getClass());
		if (method == null) {
			throw new IllegalArgumentException(
					"Could not find getter method [" + propertyName + "] on target [" + obj + ']');
		}
		invokeMethod(obj, method, value);
	}
2737
public void setProperty(final Object object, Object newValue) {
        AccessPermissionChecker.checkAccessPermission(field);
        final Object goalValue = DefaultTypeTransformation.castToType(newValue, field.getType());

        if (isFinal()) {
            throw new GroovyRuntimeException("Cannot set the property '" + name + "' because the backing field is final.");
        }
        try {
            field.set(object, goalValue);
        } catch (IllegalAccessException ex) {
            throw new GroovyRuntimeException("Cannot set the property '" + name + "'.", ex);
        }
    }
453720
public static Object setObjectProp(Object obj, String property,
                                       Object value, Context cx,
                                       Scriptable scope)
    {
        Scriptable sobj = toObjectOrNull(cx, obj, scope);
        if (sobj == null) {
            throw undefWriteError(obj, property, value);
        }
        return setObjectProp(sobj, property, value, cx);
    }
1147114
@Override
    public void set(String propName, Object value) {
        if (propName.equals("mappedProperties")) {
            getMappedProperties().add(((String) value));
        }
        super.set(propName, value);
    }
584929
public synchronized void setProperty(PropertyKey key, Object value)
    {
        if (!isValidKey(key))
            throw new IllegalArgumentException("Key " + key + " is not valid for " + getMapClass());

        //
        // Validate the value argument, based upon the property type reference by the key
        //
        Class propType = key.getPropertyType();
        if (value == null)
        {
            if (propType.isPrimitive() || propType.isAnnotation())
                throw new IllegalArgumentException("Invalid null value for key " + key);
        }
        else
        {
            if (propType.isPrimitive())
                propType = (Class)_primToObject.get(propType);

            if (!propType.isAssignableFrom(value.getClass()))
            {
                throw new IllegalArgumentException("Value class (" + value.getClass() + 
                                                   ") not of expected type: " + propType);
            }
        }
        _properties.put(key, value);
        _propertySets.add(key.getPropertySet());
    }
282719
public void setProperty(Object object, String property, Object newValue) {
        delegate.setProperty(object, property, newValue);
    }
231799
@Override
    public void setValue(Object value) {
        super.setValue(value);
        if (parent != null) {
            Object parentValue = parent.getValue();
            if (parentValue != null) {
                writeToObject(parentValue);
                parent.setValue(parentValue);
            }
        }
        if (value != null) {
            for (Property subProperty : subProperties) {
                subProperty.readFromObject(value);
            }
        }
    }
567417
public static void setPropertyEL(Object obj, String prop, Object value) {

	// first check for field
	Field[] fields = getFieldsIgnoreCase(obj.getClass(), prop, null);
	if (!ArrayUtil.isEmpty(fields)) {
	    try {
		fields[0].set(obj, value);
		return;
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	}

	// then check for setter
	try {
	    getSetter(obj, prop, value).invoke(obj);
	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	}

    }
824586
public static void setPropertyValue(StructuralProperty property, Object object, Object value) {
        Field field = property.getJavaField();
        field.setAccessible(true);
        try {
            field.set(object, value);
        } catch (IllegalAccessException e) {
            throw new ODataSystemException("Cannot write property: " + property + " of object: " + object, e);
        }
    }
495377
public void setProperty(String property, Object newValue) {
        /** @todo we should check if we have the property with the metaClass instead of try/catch  */
        try {
            super.setProperty(property, newValue);
        }
        catch (MissingPropertyException e) {
            setVariable(property, newValue);
        }
    }
1099833
public void setProperty(String name, String value) {
        Validate.notNullOrEmpty(name, "Name of property can not be a null object nor an empty string!");
        Validate.notNull(value, "Value of property can not be a null object!");

        configuration.put(name, value);
    }
691667
public void setReturnSessionOrObject(PrintWriter out, Object objReturn)
    {
        String strID = null;
        String strSessionClass = null;
        if (objReturn instanceof RemoteTable)
        {
            strSessionClass = REMOTE_TABLE;
            strID = this.add(new TableHolder(this, (RemoteTable)objReturn));
        }
        else if (objReturn instanceof RemoteSession)
        {
            strSessionClass = REMOTE_SESSION;
            strID = this.add(new SessionHolder(this, (RemoteSession)objReturn));
        }
        else if (objReturn instanceof RemoteBaseSession)
        {
            strSessionClass = REMOTE_BASE_SESSION;
            strID = this.add(new BaseSessionHolder(this, (RemoteBaseSession)objReturn));
        }
        if (strID != null)
            this.setReturnString(out, strSessionClass + CLASS_SEPARATOR + strID);
        else
            this.setReturnObject(out, objReturn);
    }