invokes the setter on the filed

@param object
@param field
@return
771461
public static void invokeSetter(Object object, Field field, Object value, boolean ignoreNonExisting)
	{
		if(null == field && ignoreNonExisting) {
			return;
		}
		ReflectionUtils.invokeMethod(ReflectionUtils.findMethod(object.getClass(), ReflectUtils.toSetter(field.getName()), field.getType()), object, value);
	}
1053554
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case EXECUTION_COMMAND:
      return is_set_execution_command();
    case SCRIPT:
      return is_set_script();
    }
    throw new IllegalStateException();
  }
20785
private static void setListParam(Field field, List<?> values) {
        try {
            // Find method: clear() and call it
            Class<?> fieldClass = field.getType();
            Method clearMethod = fieldClass.getMethod("clear");
            clearMethod.invoke(field.get(config));
            
            // Find List method: add(Object) 
            Method addMethod = fieldClass.getMethod("add", Object.class);
            
            // Add each map key/value to field value
            for (Object subParam : values) {
                if (subParam instanceof String) {
                    addMethod.invoke(field.get(config), subParam);
                } else {
                    throw new RuntimeException("Unexpected parameter type for '" + field.getName() + ":" + subParam);
                }
            }
        } catch (NoSuchMethodException  | IllegalArgumentException | InvocationTargetException | IllegalAccessException e) {
            throw new RuntimeException("Error setting configuration parameter '" + field.getName() + "'", e);
        }
    }
629303
function(property, value, fields) {
            fields = fields || [];

            var setters = this.__getSetters(property, true);

            for (var i = 0, ii = setters.length; i < ii; ++i) {

                var result = setters[i].call(this, value, fields);

                if (!_.isUndefined(result)) {
                    value = result;
                }
            }

            return value;
        }
769755
public static void setFieldValeByType(Field field, Object obj, String value)
            throws Exception {

        Class<?> type = field.getType();

        String typeName = type.getName();

        if (typeName.equals("int")) {

            if (value.equals("")) {
                value = "0";
            }
            field.set(obj, Integer.valueOf(value));

        } else if (typeName.equals("long")) {

            if (value.equals("")) {
                value = "0";
            }
            field.set(obj, Long.valueOf(value));

        } else if (typeName.equals("boolean")) {

            if (value.equals("")) {
                value = "false";
            }
            field.set(obj, Boolean.valueOf(value));

        } else if (typeName.equals("double")) {

            if (value.equals("")) {
                value = "0.0";
            }
            field.set(obj, Double.valueOf(value));

        } else {

            field.set(obj, value);
        }
    }
1010733
private static Object reflectObjValue(Object o, String field) throws Exception {
        final Class<?> c = o.getClass();
        final Field f = findField(c, field); //        c.getField(field);
        if (f == null) {
            return null;
        }
        final boolean accessible = f.isAccessible();
        try {
            f.setAccessible(true);
            return f.get(o);
        } finally {
            f.setAccessible(accessible);
        }
    }
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);
        }
    }
1216279
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case SETTABLE:
      return is_set_settable();
    case VERSION:
      return is_set_version();
    }
    throw new IllegalStateException();
  }
1346144
private void setField(Object value, Object object, Field f) {
        f.setAccessible(true);

        Object valueToSet = value;
        try {
            // check if field type is enum
            if (Enum.class.isAssignableFrom(f.getType())) {
                Enum v = Enum.valueOf((Class<Enum>) f.getType(), String.valueOf(value));
                valueToSet = v;
            }
            f.set(object, valueToSet);
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
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;
    }
718749
public static MethodInstance getSetter(Object obj, String prop, Object value, MethodInstance defaultValue) {
	prop = "set" + StringUtil.ucFirst(prop);
	MethodInstance mi = getMethodInstanceEL(obj, obj.getClass(), KeyImpl.getInstance(prop), new Object[] { value });
	if (mi == null) return defaultValue;
	Method m = mi.getMethod();

	if (m.getReturnType() != void.class) return defaultValue;
	return mi;
    }
702416
private void primitiveGetter(Field field) {
    String typeName = field.getType().getName();
    String methodName = String.format("get%c%s", Character.toUpperCase(typeName.charAt(0)), typeName.substring(1));

    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(field.getType(), methodName, Object.class),
                                               null, new Type[0], classWriter);
    if (isPrivate) {
      // get the value using the generic Object get(Object) method and unbox the value
      mg.loadThis();
      mg.loadArg(0);
      mg.invokeVirtual(Type.getObjectType(className), getMethod(Object.class, "get", Object.class));
      mg.unbox(Type.getType(field.getType()));
    } else {
      // Simply access the field.
      mg.loadArg(0);
      mg.checkCast(Type.getType(field.getDeclaringClass()));
      mg.getField(Type.getType(field.getDeclaringClass()), field.getName(), Type.getType(field.getType()));
    }
    mg.returnValue();
    mg.endMethod();
  }
912480
private static void setFields(final Object from, final Object to,
	                              final Field[] fields, final boolean accessible,
	                              final Map objMap, final Map metadataMap)
	{
		for (int f = 0, fieldsLength = fields.length; f < fieldsLength; ++f)
		{
			final Field field = fields[f];
			final int modifiers = field.getModifiers();
			if ((Modifier.STATIC & modifiers) != 0) continue;
			if ((Modifier.FINAL & modifiers) != 0)
				throw new ObjectCopyException("cannot set final field [" + field.getName() + "] of class [" + from.getClass().getName() + "]");
			if (!accessible && ((Modifier.PUBLIC & modifiers) == 0))
			{
				try
				{
					field.setAccessible(true);
				}
				catch (SecurityException e)
				{
					throw new ObjectCopyException("cannot access field [" + field.getName() + "] of class [" + from.getClass().getName() + "]: " + e.toString(), e);
				}
			}
			try
			{
				cloneAndSetFieldValue(field, from, to, objMap, metadataMap);
			}
			catch (Exception e)
			{
				throw new ObjectCopyException("cannot set field [" + field.getName() + "] of class [" + from.getClass().getName() + "]: " + e.toString(), e);
			}
		}
	}
981675
public Notification setFieldValue(String field, @Nullable String value) {
    fields.put(field, value);
    return this;
  }
954076
public static Object getValue(Field field, Object object) {
		String fieldName = field.getName();
		String setMethodName = "get" + firstLetterUpperCase(fieldName);
		Method method = null;
		try {
			method = object.getClass().getMethod(setMethodName);
		} catch (Exception e) {
		}
		
		if(method != null) {
			try {
				return method.invoke(object);
			} catch (Exception e) {
				LOGGER.error("method invoke", e);
			}
		}
		
		field.setAccessible(true);
		try {
			return field.get(object);
		} catch (Exception e) {
			LOGGER.error("method invoke", e);
			return null;
		}
	}
927950
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case TYPE:
      return isSetType();
    case TYPE_QUALIFIERS:
      return isSetTypeQualifiers();
    }
    throw new IllegalStateException();
  }
594362
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case IS_ENABLE:
      return is_set_isEnable();
    }
    throw new IllegalStateException();
  }