为对象的属性注入指定值

@param obj      指定对象
@param propName 属性名称
@param value    要注入的属性值
@return 如果注入成功则返回<code>true</code>
763991
public static boolean setProperty(Object obj, String propName, Object value) {
        try {
            setFieldValue(obj, propName, value);
            return true;
        } catch (Throwable e) {
            return false;
        }
    }
883963
public void set(String propName, Object value) {
        if (propName.equals(PROP_IDENTIFIER)) {
            setIdentifier(((IdentifierType) value));
        }
        if (propName.equals(PROP_VIEW_IDENTIFIERS)) {
            getViewIdentifiers().add(((com.ibm.wsspi.security.wim.model.ViewIdentifierType) value));
        }
        if (propName.equals(PROP_PARENT)) {
            setParent(((Entity) value));
        }
        if (propName.equals(PROP_CHILDREN)) {
            getChildren().add(((com.ibm.wsspi.security.wim.model.Entity) value));
        }
        if (propName.equals(PROP_GROUPS)) {
            getGroups().add(((com.ibm.wsspi.security.wim.model.Group) value));
        }
        if (propName.equals(PROP_CREATE_TIMESTAMP)) {
            setCreateTimestamp(((Date) value));
        }
        if (propName.equals(PROP_MODIFY_TIMESTAMP)) {
            setModifyTimestamp(((Date) value));
        }
        if (propName.equals(PROP_ENTITLEMENT_INFO)) {
            setEntitlementInfo(((EntitlementInfoType) value));
        }
        if (propName.equals(PROP_CHANGE_TYPE)) {
            setChangeType(((String) value));
        }
    }
926717
protected static Object toSafeJsonValue(Object value) {
        if (value == null) {
            return null;
        } else {
            if (value instanceof Boolean || value instanceof String || value instanceof Number) {
                return value;
            }
            if (value instanceof Iterable) {
                Iterable iterable = (Iterable) value;
                List answer = new ArrayList<>();
                for (Object item : iterable) {
                    Object itemJson = toSafeJsonValue(item);
                    if (itemJson != null) {
                        answer.add(itemJson);
                    }
                }
                return answer;
            }
            if (value instanceof ProjectProvider) {
                ProjectProvider projectProvider = (ProjectProvider) value;
                return projectProvider.getType();
            }
            if (value instanceof ProjectType) {
                ProjectType projectType = (ProjectType) value;
                return projectType.getType();
            }
            if (value instanceof StackFacet) {
                StackFacet stackFacet = (StackFacet) value;
                Stack stack = stackFacet.getStack();
                if (stack != null) {
                    return stack.getName();
                } else {
                    return null;
                }
            }
            value = Proxies.unwrap(value);
            if (value instanceof ProjectProvider) {
                ProjectProvider projectProvider = (ProjectProvider) value;
                return projectProvider.getType();
            }
            if (value instanceof ProjectType) {
                ProjectType projectType = (ProjectType) value;
                return projectType.getType();
            }
            if (value instanceof StackFacet) {
                StackFacet stackFacet = (StackFacet) value;
                Stack stack = stackFacet.getStack();
                if (stack != null) {
                    return stack.getName();
                } else {
                    return null;
                }
            }
            if (isJsonObject(value)) {
                return value;
            }
            return value.toString();
        }
    }
1147114
@Override
    public void set(String propName, Object value) {
        if (propName.equals("mappedProperties")) {
            getMappedProperties().add(((String) value));
        }
        super.set(propName, value);
    }
516362
function (propType, values) {

	propType.info = Object.assign(
		propType.info ? propType.info : {},
		values
	);

	if (propType.isRequired) {
		propType.isRequired.info = Object.assign(
			propType.isRequired && propType.isRequired.info ? propType.isRequired.info : {},
			values
		);

		propType.isRequired.info.isRequired = true;
		propType.info.isRequired = false;
	}

	return propType;
}
978604
public void set(String propName, Object value) {
        if (propName.equals("repositoryId")) {
            setRepositoryId(((String) value));
        }
        if (propName.equals("repositoryCheckPoint")) {
            setRepositoryCheckPoint(((String) value));
        }
    }
999018
function (target, name, value) {
			var inst = this._getInst(target);
			if (!inst) {
				return FALSE;
			}
			//TODO check name
			inst[name] = value;
			$.data(target, PROP_NAME, inst);
		}
290636
public static void setProperty(Object obj, String propertyName, final Object value) {
		Method method = getSetterMethod(obj.getClass(), propertyName, value.getClass());
		if (method != null) {
			invokeMethod(obj, method, value);
		} else {
			setFieldValue(obj, propertyName, value);
		}
	}
1036504
boolean setValue( Object object, String propertyName, Object value )
	{
		Clazz<?> s = ClassInfo.Clazz( object.getClass() );

		if( Property.class == getPropertyType( s, propertyName ) )
		{
			Property<Object> property = getPropertyImpl( object, propertyName );
			if( property != null )
			{
				property.setValue( value );
				return true;
			}

			return false;
		}

		return setPropertyImpl( s, object, propertyName, value );
	}
63621
public static void invokeSetterMethod(Object obj, String propertyName, Object value) {
		invokeSetterMethod(obj, propertyName, value, null);
	}
359112
function propReplace(obj, prop, value) {
    var o = {};
    for (var p in obj) {
        if (o.hasOwnProperty.call(obj, p)) {
            if (typeof obj[p] == 'object' && !Array.isArray(obj[p])) {
                propReplace(obj[p], prop, value);
            } else if (p == prop) {
                obj[p] = value;
            }
        }
    }
}
1097251
public boolean isSet(String propName) {
        if (propName.equals("value")) {
            return isSetValue();
        }
        if (propName.equals("lang")) {
            return isSetLang();
        }
        return false;
    }
521821
public void addProperty(String propertyName, Object value)
    {
        if (propertyName != null)
        {
            propertyNames.add(propertyName);
            if (value == null)
            {
                properties.remove(propertyName);
            }
            else
            {
                properties.put(propertyName, value);
            }
        }
    }
997216
public boolean remove(Object key, Object value) {
        final Object curValue = get(key);

        if (!Objects.equals(curValue, value) || (curValue == null && !containsKey(key))) {
            return false;
        }

        remove(key);

        return true;
    }
788772
function setPropertyByPath(obj, propString, value) {

    var propNames = propString.split('.');
    var propLength = propNames.length - 1;
    var tmpObj = obj;

    for (var i = 0; i <= propLength; i++) {
        tmpObj = tmpObj[propNames[i]] = i !== propLength ? {} : value;
    }
    return obj;
}
910744
function(obj, propName, value)
{
	if (arguments.length == 2)
	{
		value = obj[propName];
	}
	
	Object.defineProperty(obj, propName, {enumerable:false, configurable:true, writable:true, value:value});
}
252892
public static boolean isELValue(Object value) {
        String elVal = ObjectUtils.toString(value);
        elVal = StringUtils.trim(elVal);
        return StringUtils.startsWith(elVal, EL_PREFIX);
    }