set accessible to 'true' then set field value

@param obj   the object whose field should be modified
@param toSet the new value for the field of obj being modified
@return <code>this</code>
359397
public FieldSupport<FieldType, ObjectType> set(ObjectType obj, Object toSet) {
                try {
                        f.setAccessible(true);
                        f.set(obj, toSet);
                        return this;
                } catch (Exception e) {
                        throw $(e);
                }
        }
184274
public static void setField(Object obj, Field field, Object value) {
        boolean accessible = field.isAccessible();
        //hack accessibility
        if (!accessible) {
            field.setAccessible(true);
        }
        try {
            field.set(obj, value);
        } catch (IllegalAccessException e) {
            //ignore should not happen as accessibility has been updated to suit assignment
            e.printStackTrace(); // $COVERAGE-IGNORE$
        }
        //restore accessibility
        field.setAccessible(accessible);
    }
248032
public static void set(Object target, Field field, Object value)
    {
        if (target != null)
        {
            if (!field.isAccessible())
            {
                field.setAccessible(true);
            }
            try
            {
                field.set(target, value);
            }
            catch (IllegalArgumentException iarg)
            {
                throw new PropertyAccessException(iarg);
            }
            catch (IllegalAccessException iacc)
            {
                throw new PropertyAccessException(iacc);
            }
        } // ignore if object is null;
    }
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);
    }
661234
public static <T extends Object> T setFieldValue(Object obj, Field field, T fieldValue) {
        Assert.notNull(obj, "obj不能为空");
        Assert.notNull(field, "field不能为空");

        try {
            field.set(obj, fieldValue);
        } catch (IllegalAccessException e) {
            String msg = StringUtils.format("类型[{0}]的字段[{1}]不允许设置", obj.getClass(),
                field.getName());
            log.error(msg);
            throw new ReflectException(msg, e);
        }
        return fieldValue;
    }
678142
public void set(Object object, Object value) throws IllegalAccessException, IllegalArgumentException {
        if (null != setter) {
            try {
                setter.invoke(object, value);
            } catch (InvocationTargetException ite) {
                if (ite.getCause() instanceof RuntimeException && !(ite.getCause() instanceof JTransfoException)) {
                    throw (RuntimeException) ite.getCause();
                }
                throw new JTransfoException(String.format(GET_SET_ITO, setter.getName(), object.getClass().getName(),
                        setter.getDeclaringClass().getName(), ite.getCause().getMessage()), ite.getCause());
            }
        } else {
            if (!setUsingFieldLogged) {
                log.warn("Cannot find setter (not public, wrong name or wrong type), "
                                + "using field to access field {} of {}.", name, field.getType().getName());
                setUsingFieldLogged = true;
            }
            field.set(object, value);
        }
    }
205318
public static Object getFieldValue(Object obj, Field field) {
        Object value = null;
        boolean accessible = field.isAccessible();
        //hack accessibility
        if (!accessible) {
            field.setAccessible(true);
        }
        try {
            value = field.get(obj);
        } catch (IllegalAccessException e) {
            //ignore should not happen as accessibility has been updated to suit assignment
            e.printStackTrace(); // $COVERAGE-IGNORE$
        }
        //restore accessibility
        field.setAccessible(accessible);
        return value;
    }
694913
public static void setPrivateField(final Object obj, final String name, final Object value) {
        try {
            final Field field = obj.getClass().getDeclaredField(name);
            field.setAccessible(true);
            field.set(obj, value);
        } catch (final Exception ex) {
            throw new RuntimeException("Couldn't set field '" + name + "' in class '" + obj.getClass() + "'", ex);
        }
    }
663173
public static final void setValue(Object obj, String fieldName, 
            Object value) {
        try {
            getField(obj.getClass(), fieldName).set(obj, value);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
243006
public void setCurrentObject(Object obj) {
        if (((obj == null) && (this.nullString != null))
                || this.requiredType.isInstance(obj)
                || (obj instanceof String)
                || (obj instanceof File)
                || ((obj instanceof Task) && this.requiredType.isAssignableFrom(((Task) obj).getTaskResultType()))) {
            this.currentValue = obj;
        } else {
            throw new IllegalArgumentException("Object not of required type.");
        }
    }
1178204
function(obj)
	{
		var el = this.__obj;
		
		if (el && obj)
		{
			conbo.forEach(obj, function(value, name)
			{
				el.setAttribute(conbo.toKebabCase(name), value);
			});
		}
		
		return this;
	}
917775
public static void setProperties(Object obj, Properties props) throws Exception {
        for (Field field : obj.getClass().getDeclaredFields()) {
            field.setAccessible(true);
            if (props.containsKey(field.getName())) {
                set(field, obj, props.getProperty(field.getName()));
            }

        }
    }
73794
public void setValue(Object obj, T value) throws IllegalAccessException, InvocationTargetException {
		if (field == null) {
			setMethod.invoke(obj, value);
		} else {
			field.set(obj, value);
		}
	}
1243349
public static function setPropertyValue($obj,$propertyName,$value,$fieldAccess=false)
    {
        $setter=self::getSetter($obj, $propertyName);
        if(!empty($setter)){
            $obj->$setter($value);
        }else if($fieldAccess && property_exists($obj, $propertyName)){
            $obj->$propertyName=$value;
        }
    }
1295602
@SuppressWarnings("unchecked")
    public <T> T set(T newUserObject) {
        T result = (T)userObject;
        userObject = newUserObject;
        return result;
    }
850432
@Override
    public Object set(int index, Object element) {
        if (clear) {
            throw new JeppettoException("set() after clear() not supported");
        }

        verifyOperation($set, BasicDBObject.class);

        return updates.put(prefix + index, DBObjectUtil.toDBObject(element));
    }
1220539
public void setControlValue(Object objValue)
    {
        boolean bDisplayData = (m_converter.getData() != objValue); // Displaying the same value will cause an endless loop

        boolean isModified = false;
        if (m_converter.getField() != null)
            isModified = m_converter.getField().isModified();
        m_converter.setData(objValue, bDisplayData, Constants.READ_MOVE);    // DO NOT! Display (will loop)
        String strDate = m_converter.toString();    // Get it in string format.
        m_converter.setString(strDate, false, Constants.READ_MOVE); // This validates the date
        if (m_converter.getField() != null)
            m_converter.getField().setModified(isModified);
        m_tf.setText(m_converter.toString());
    }