/* (non-Javadoc)
@see groovy.lang.GroovyObject#setProperty(java.lang.String, java.lang.Object)
511903
public void setProperty(String property, Object newValue) {
        if (newValue instanceof Closure) {
            if (property.equals(CONSTRUCTOR)) {
                property = GROOVY_CONSTRUCTOR;
            }
            Closure callable = (Closure) newValue;
            final List<MetaMethod> list = ClosureMetaMethod.createMethodList(property, theClass, callable);
            for (MetaMethod method : list) {
                // here we don't care if the method exists or not we assume the
                // developer is responsible and wants to override methods where necessary
                registerInstanceMethod(method);
            }
        } else {
            registerBeanProperty(property, newValue);
        }
    }
504894
@Override
  public void setSystemProperty(String propertyName, String value) {
    if (Strings.isNullOrEmpty(propertyName)) {
      throw new IllegalArgumentException("Property name can't be empty.");
    }

    execute(
        "-selendroid-setAndroidOsSystemProperty",
        ImmutableMap.of(
            "propertyName", propertyName,
            "value", value));
  }
1259544
private void setPropertyValue(Object pObj, String pProperty, 
                                  Object pValue) {
	
        Method m = null;
        Class[] cl = {pValue.getClass()};
	
        try {
            //Util.setPropertyValue(pObj, pProperty, pValue);	   
	    
            // Find method
            m = pObj.getClass().
                getMethod("set" + StringUtil.capitalize(pProperty), cl);
            // Invoke it
            Object[] args = {pValue};
            m.invoke(pObj, args);
	    
        }
        catch (NoSuchMethodException e) {
            e.printStackTrace();
        }		
        catch (IllegalAccessException iae) {
            iae.printStackTrace();
        }
        catch (InvocationTargetException ite) {
            ite.printStackTrace();
        }

    }
540243
@Override
    public void setProperty(String name, Object value) {
        session.setProperty(name, value);
    }
949449
public synchronized void setProperty(String name, Object value) {
        if (!(value instanceof Serializable)) {
            throw new IllegalArgumentException("Value must be serializable");
        }
        properties.put(name, value);
    }
1255851
@SuppressWarnings("unchecked")
    public void setProperty(Object obj, Object key, Object value) {
        if (isMap(obj))
            ((Map) obj).put(key.toString(), value);
        else {
            throw new JsonPathException("setProperty operation cannot be used with " + obj!=null?obj.getClass().getName():"null");
        }
    }
1122551
public MemberConfig setProperty(String key, String value) {
    this.properties.put(key, value);
    return this;
  }
261327
public static void setGroovyObjectProperty(Object newValue, GroovyObject object, String property) {
        object.setProperty(property, newValue);
    }
401690
@SuppressWarnings("unused")
    @Internal
    @UsedByGeneratedCode
    protected final void addProperty(@Nonnull BeanProperty<T, Object> property) {
        ArgumentUtils.requireNonNull("property", property);
        beanProperties.put(property.getName(), property);
    }
1307208
public void setProperty(final String propertyName, final List<String> values) {
        Preconditions.checkNotNull(propertyName);
        if (values == null) {
            properties.put(propertyName, null);
            return;
        }
        properties.put(propertyName, values);
    }
735091
@Override
    public void setValue(Object instance, String propertyName, Object value) {
        if (!isWriteIgnored(instance, propertyName)) {
            PropertyProxyUtils.getPropertyAccessor(this.conversionService, this.useDirectFieldAccess, instance).setPropertyValue(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 );
	}
1096448
public void setProperty(String name, Object value) throws IllegalArgumentException, IllegalStateException {
		if (name == null) {
			throw new IllegalArgumentException("property name can not be null");
		}
		if (PROPERTY_SERIALIZER_INDENTATION.equals(name)) {
			indentationString = (String) value;
		} else if (PROPERTY_SERIALIZER_LINE_SEPARATOR.equals(name)) {
			lineSeparator = (String) value;
		} else if (PROPERTY_LOCATION.equals(name)) {
			location = (String) value;
		} else {
			throw new IllegalStateException("unsupported property " + name);
		}
		writeLineSepartor = lineSeparator != null && lineSeparator.length() > 0;
		writeIndentation = indentationString != null && indentationString.length() > 0;
		// optimize - do not write when nothing to write ...
		doIndent = indentationString != null && (writeLineSepartor || writeIndentation);
		// NOTE: when indentationString == null there is no indentation
		// (even though writeLineSeparator may be true ...)
		rebuildIndentationBuf();
		seenTag = false; // for consistency
	}
775555
public static void set(String key, String value) {
        PROPS.get().setProperty(key, value);
    }
933313
private static void setProperty( Object bean, String key, Object value, JsonConfig jsonConfig )
         throws Exception {
      PropertySetStrategy propertySetStrategy = jsonConfig.getPropertySetStrategy() != null ? jsonConfig.getPropertySetStrategy()
            : PropertySetStrategy.DEFAULT;
      propertySetStrategy.setProperty( bean, key, value, jsonConfig );
   }
1069266
@Override
    public void setProperty(String propertyId, Object value)
            throws SAXNotRecognizedException, SAXNotSupportedException {
        // see if the property is recognized
        getProperty(propertyId);

        // Properties with a defined value, we just change it if we can.

        if ((PROPERTY + "declaration-handler").equals(propertyId)) {
            if (value == null) {
                declHandler = base;
            } else if (!(value instanceof DeclHandler)) {
                throw new SAXNotSupportedException(propertyId);
            } else {
                declHandler = (DeclHandler) value;
            }
            return;
        }

        if ((PROPERTY + "lexical-handler").equals(propertyId)) {
            if (value == null) {
                lexicalHandler = base;
            } else if (!(value instanceof LexicalHandler)) {
                throw new SAXNotSupportedException(propertyId);
            } else {
                lexicalHandler = (LexicalHandler) value;
            }
            return;
        }

        throw new SAXNotSupportedException(propertyId);
    }
1072096
@Override
    public void setPropertyValue(PropertyInfo propInfo, Object value) throws Exception {
        String propId = propInfo.getId();
        Object obj = registeredProperties == null ? null : registeredProperties.get(propId);

        if (obj == null) {
            obj = new PropertyProxy(propInfo, value);
            registerProperties(obj, propId);
        } else if (obj instanceof PropertyProxy) {
            ((PropertyProxy) obj).setValue(value);
        } else {
            propInfo.setPropertyValue(obj, value, obj == this);
        }
    }