/** * 设置模型值 * @param {Object} value  setModelValue: function (value) { if (!this.dataModel) return; this.dataModel.setValue(this.field, value) }, 
设置控件值
@param {Object} value
779959
function (value) {
            this.trueValue = this.formater ? this.formater.format(value) : value;
            this.showValue = this.masker ? this.masker.format(this.trueValue).value : this.trueValue;
            this.setShowValue(this.showValue);
            this.slice = true;
            this.dataModel.setValue(this.field, this.trueValue);
            this.slice = false;
        }
736848
public function setValue(string $key, $value): void
    {
        if (isset($this->orgData[$key])) {
            if (isset($this->removeAttributes[$key])) {
                // 已经被删除
                unset($this->removeAttributes[$key]);
            }
            if ($this->orgData[$key] != $value) {
                $this->updateAttributes[$key] = $value;
            }elseif (isset($this->updateAttributes[$key])){
                unset($this->updateAttributes[$key]);
            }
        } else {
            $this->addAttributes[$key] = $value;
        }
    }
672423
public static void setFieldValue(Field field, Object obj, Object value) {
    if (Modifier.isFinal(field.getModifiers())) {
      Object finalValue = getFieldValue(field, obj);
      if (value == null ? finalValue != null : !value.equals(finalValue)) {
        throw new IllegalArgumentException(
            "expected final value <"
                + finalValue
                + "> but was <"
                + value
                + "> on "
                + field.getName()
                + " field in "
                + obj.getClass().getName());
      }
    } else {
      try {
        field.set(obj, value);
      } catch (SecurityException e) {
        throw new IllegalArgumentException(e);
      } catch (IllegalAccessException e) {
        throw new IllegalArgumentException(e);
      }
    }
  }
1250832
public static void setValue(MetaLookup metaLookup, AnyTypeObject dataObject, Object value) {
		MetaDataObject meta = metaLookup.getMeta(dataObject.getClass()).asDataObject();
		if (value == null) {
			for (MetaAttribute attr : meta.getAttributes()) {
				attr.setValue(dataObject, null);
			}
		}
		else {
			boolean found = false;
			for (MetaAttribute attr : meta.getAttributes()) {
				if (attr.getType().getImplementationClass().isAssignableFrom(value.getClass())) {
					attr.setValue(dataObject, value);
					found = true;
				}
				else {
					attr.setValue(dataObject, null);
				}
			}
			if (!found) {
				throw new IllegalStateException("cannot assign " + value + " to " + dataObject);
			}
		}
	}
691074
private void appendValue(Object value) {
        if (value == null) {
            append("null");
        } else if (value instanceof MwsObject) {
            append("{");
            needComma = false;
            ((MwsObject) value).writeFragmentTo(this);
            append("}");
        } else if (value instanceof Boolean || value instanceof Number) {
            append(value.toString());
        } else if (value instanceof String) {
            append("\"");
            escape((String) value);
            append("\"");
        } else if (value instanceof Node) {
            appendValue(MwsUtl.toXmlString((Node) value));
        } else if (value instanceof XMLGregorianCalendar) {
            append(((XMLGregorianCalendar) value).toXMLFormat());
        } else if (value instanceof Enum) {
            append(value.toString());
        } else {
            throw new IllegalArgumentException("Unsupported type "+value.getClass().getName());
        }
        needComma = true;
    }
403774
function( option, value ) {
            var curr = this.data( dataName ).options || {},
                prev = $.extend( {}, curr );

            if ( typeof option === "string" && option[ 0 ] !== "_" ) {
                if ( value === undefined ) {
                    return curr[ option ];
                } else {
                    curr[ option ] = value;
                    updateOptions( this, prev, curr );

                    return this;
                }
            } else if ( $.isPlainObject( option ) ) {
                $.extend( curr, option );
                updateOptions( this, prev, curr );

                this.data( dataName ).options = curr;
            }

            return curr;
        }
1020161
public int setValue(double value, boolean bDisplayOption, int iMoveMode)
    {           // Set this field's value
        Boolean bField = Boolean.FALSE;
        if (value != 0)
            bField = Boolean.TRUE;
        int errorCode = this.setData(bField, bDisplayOption, iMoveMode);
        return errorCode;
    }
776840
function setValue(object, key, value) {
  if (key in object === true) return;
  object[key] = value;
}
957711
@SuppressWarnings({ "unchecked", "rawtypes" })
	public static void setFieldValue(Object bean, String fieldNameOrIndex, Object value) {
		if (bean instanceof Map) {
			((Map) bean).put(fieldNameOrIndex, value);
		} else if (bean instanceof List) {
			CollUtil.setOrAppend((List) bean, Convert.toInt(fieldNameOrIndex), value);
		} else if (ArrayUtil.isArray(bean)) {
			ArrayUtil.setOrAppend(bean, Convert.toInt(fieldNameOrIndex), value);
		} else {
			// 普通Bean对象
			ReflectUtil.setFieldValue(bean, fieldNameOrIndex, value);
		}
	}
934176
public void setLong(String fieldName, Long value) {
		if (value == null) {
			throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
		}
		fieldList.add(fieldName);
		statementParameter.setLong(value);
	}
629783
@Override
    public void setValue(org.openprovenance.prov.model.LangString value) {
        this.value = value;
    }
1304799
private static <OriginObject, TargetObject> TargetObject setValue(OriginObject originObject, TargetObject targetObject, Class<TargetObject> targetClass) {

        Field[] targetFields = ReflectUtil.getFieldArrayIncludeSupClassExcludeUID(targetClass);

        Field originField = null; //目标字段类型

        Object originValue = null; //原始对象属性值
        Object targetValue = null; //目标对象属性值

        //从目标对象中找原始对象的属性方式，
        for (Field targetField : targetFields) {

            originField = ReflectUtil.getField(originObject.getClass(), targetField.getName());

            if (originField == null) { //目标对象有，但是原始对象中没有
                continue;
            }

            if (Modifier.isStatic(originField.getModifiers())) {
                continue;
            }

            targetField.setAccessible(true);
            originField.setAccessible(true);

            originValue = ReflectUtil.getFieldVal(originObject, targetField.getName());
            if (originValue == null) { //从原始对象中获取的字段属性为null
                continue;
            }

            targetValue = ValueCast.cast(targetField, targetObject, originValue);

            if (targetValue != null) {
                try {
                    targetField.set(targetObject, targetValue);
                } catch (IllegalArgumentException e) {
                    e.printStackTrace();
                } catch (IllegalAccessException e) {//为目标属性赋值失败
                    e.printStackTrace();
                }
            }
        }

        return targetObject;
    }
424298
function resolve(resolver, value) {
        // 保证resolvePromise与rejectPromise
        // 只能被调用一次
        // （不确定value是否是Promise对象）
        // see #2.3.3.3.3
        var called;

        function onFulfilled(data) {
            if (!called) {
                resolve(resolver, data);
                called = true;
            }
        }

        function onRejected(reason) {
            if (!called) {
                resolver.reject(reason);
                called = true;
            }
        }

        function work() {
            var then;
            // 不再额外判断value是否是Promise对象
            if (isObject(value) || isFunction(value)) {
                // 必须先保存对then对引用
                // 官方的test spec中有检查对then的引用次数只能为1
                then = value.then;
                if (isFunction(then)) {
                    then.call(value, onFulfilled, onRejected);
                }
                else {
                    then = null;
                }
            }

            if (!then) {
                resolver.fulfill(value);
            }
        }

        if (captureException) {
            try {
                work();
            }
            catch (e) {
                if (!called) {
                    emitExceptionEvent(e);
                    resolver.reject(e);
                }
            }
        }
        else {
            work();
        }

    }
565937
function valueProcess(name, value) {
    //首先将传入的value表达式的值进行分好分割，得到每一个路径表达式
    var tempResults = value.split(';'),
        results = [],
        ruleList,
        ruleItem;
    switch (name) {
        case 'stylesheet':
            for(var i = 0, len = tempResults.length; i < len; i ++) {
                results.push(_injectVaribles(path.join(basePath, _options.MODULE, 'assets/css', tempResults[i]+".css")));
            }
            break;
        case 'rule':

            for(var i = 0, len = tempResults.length; i < len; i ++) {
                //拿到当前rule的规则，是一个数组
                ruleList = rules[tempResults[i]] || [];
                for(var j = 0, jLen = ruleList.length; j < jLen; j ++) {
                    //拿到规则声明中的每一项
                    ruleItem = ruleList[j];
                    //根据规则名，递归解析当前规则，实现规则引规则
                    Array.prototype.push.apply(results, valueProcess(ruleItem.name, ruleItem.value.join(';')));
                }
            }
            break;
        case 'file':
            for(var i = 0, len = tempResults.length; i < len; i ++) {
                results.push(_injectVaribles(path.join(basePath, tempResults[i])));
            }
            break;
        case 'template':
            for(var i = 0, len = tempResults.length; i < len; i ++) {
                results.push(_injectVaribles(path.join(basePath, _options.MODULE, 'modules/template', tempResults[i] + ".html")));
            }
            break;
        case 'classes':
            for(var i = 0, len = tempResults.length; i < len; i ++) {
                results.push(_injectVaribles(path.join(basePath, _options.MODULE, 'modules/classes', tempResults[i] + ".js")));
            }
            break;
        default :
            throw new PluginError('gulp-xinclude', "没有对应的命令：[" + name + "]");
    }
    return results;
}
341078
private void putValue(Object value) {
        if (value==null) {
            return;
        }
        if (value instanceof MwsObject) {
            parameterPrefix.append('.');
            ((MwsObject)value).writeFragmentTo(this);
            return;
        }
        String svalue = value.toString();
        if (svalue!=null && svalue.length()>0) {
            String name = parameterPrefix.toString();
            parameters.put(name, svalue);
        }
    }
50471
public static void setFieldValue(final Object object, final String fieldName, final Object value) {

        final boolean success = new DerivedClassIterator(object.getClass()) {

            @Override
            protected boolean handleClass(final Class<?> clazz) {
                try {
                    setFieldValue(object, clazz, fieldName, value);
                    return true;
                } catch (final NoSuchFieldException e) {
                    LOG.debug("could not set field " + fieldName + " value " + value, e);

                }
                return false;
            }
        }.iterate();

        if (!success) {
            LOG.warn("could not set field " + fieldName + " value " + value);
        }
    }
547695
public static boolean setValue(Field field, Object object, Object value) {
		String fieldName = field.getName();
		String setMethodName = "set" + firstLetterUpperCase(fieldName);
		value = TypeAutoCast.cast(value, field.getType());
		
		Method method = null;
		try {
			method = object.getClass().getMethod(setMethodName, value.getClass());
		} catch (Exception e) {
		}
		
		if(method != null) {
			try {
				method.invoke(object, value);
			} catch (Exception e) {
				LOGGER.error("method invoke", e);
				return false;
			}
		} else {
			field.setAccessible(true);
			try {
				field.set(object, value);
			} catch (Exception e) {
				LOGGER.error("method invoke", e);
				return false;
			}
		}
		
		return true;
	}