Applies the custom property to the given declaration
518297
function (customProperty, declaration) {
  customProperty.declarations.forEach(function (customDeclaration) {
    // No need to copy value here as replace will copy value
    var value = customDeclaration.value;

    // Replace parameter variables with user given values
    customDeclaration.variables.forEach(function (variable) {
      value = value.replace(customProperty.parameters[variable],
        declaration.values[variable]);
    });

    // Using cloneBefore to insert declaration provides sourcemap support
    declaration.cloneBefore({
      prop: customDeclaration.property,
      value: value
    });
  });

  declaration.remove();
}
2737
public void setProperty(final Object object, Object newValue) {
        AccessPermissionChecker.checkAccessPermission(field);
        final Object goalValue = DefaultTypeTransformation.castToType(newValue, field.getType());

        if (isFinal()) {
            throw new GroovyRuntimeException("Cannot set the property '" + name + "' because the backing field is final.");
        }
        try {
            field.set(object, goalValue);
        } catch (IllegalAccessException ex) {
            throw new GroovyRuntimeException("Cannot set the property '" + name + "'.", ex);
        }
    }
466575
protected Declaration createDeclaration(String property, Term<?> term)
    {
        Declaration d = CSSFactory.getRuleFactory().createDeclaration();
        d.unlock();
        d.setProperty(property);
        d.add(term);
        return d;
    }
293402
public void assignMutableBinding(ExecutionContext context, String name, Object value, boolean configurable, boolean strict) {
        final boolean exists = hasBinding(context, name);
        if (!exists) {
            PropertyDescriptor desc = new PropertyDescriptor();
            desc.setValue(value);
            desc.setConfigurable(configurable);
            this.mutableBindings.put(name, desc);
        } else {
            PropertyDescriptor desc = this.mutableBindings.get(name);
            desc.setValue(value);
            return;
        }
    }
166555
function(object, defaultValue, property) {
        if (!_.isUndefined(defaultValue)) {
            object.__setPropertyParam(property, 'default', defaultValue);
        }
    }
251836
def setDeclaration(self, declaration):
        
        assert isinstance(declaration.proxy, ProxyAbstractItemView), \
            "The model declaration must be a QtAbstractItemView subclass. " \
            "Got {]".format(declaration)

        self.declaration = declaration
601742
def add_special(self, name):
        """"""
        self.undeclared.discard(name)
        self.declared.add(name)
699
private void addProperty(XMLStreamWriter writer, String name, Class<?> propertyType, String readMethod, String writeMethod) throws XMLStreamException
   {
      if (name.length() != 0)
      {
         writer.writeStartElement("property");

         // convert property name to .NET style (i.e. first letter uppercase)
         String propertyName = name.substring(0, 1).toUpperCase() + name.substring(1);
         writer.writeAttribute("name", propertyName);

         String type = getTypeString(propertyType);

         writer.writeAttribute("sig", "()" + type);
         if (readMethod != null)
         {
            writer.writeStartElement("getter");
            writer.writeAttribute("name", readMethod);
            writer.writeAttribute("sig", "()" + type);
            writer.writeEndElement();
         }
         if (writeMethod != null)
         {
            writer.writeStartElement("setter");
            writer.writeAttribute("name", writeMethod);
            writer.writeAttribute("sig", "(" + type + ")V");
            writer.writeEndElement();
         }

         writer.writeEndElement();
      }
   }
219115
public void defineOwnProperty(Context cx, Object id, ScriptableObject desc) {
        checkPropertyDefinition(desc);
        defineOwnProperty(cx, id, desc, true);
    }
1299202
def define_property(obj, name, fget=None, fset=None, fdel=None, doc=None):
    """"""
    if hasattr(fget, '__get__'):  # can pass a property declaration too
        prop = fget
    else:
        prop = property(fget, fset, fdel, doc)
    cls = obj.__class__
    obj.__class__ = type(cls.__name__, (cls, ), {
        '__doc__': cls.__doc__,
        name: prop
    })
503365
private void setCustomProperties(List<Map<String, String>> propList) throws WIMException {
        final String METHODNAME = "setCustomProperties";
        customPropertyMap = new HashMap<String, String>();
        if (propList == null) {
            return;
        }
        Iterator<Map<String, String>> itr = propList.iterator();
        while (itr.hasNext()) {
            Map<String, String> propMap = itr.next();
            String propName = propMap.get(ConfigConstants.CONFIG_PROP_NAME);
            // String propValue = expandVar(propMap.get(ConfigConstants.CONFIG_PROP_VALUE));
            String propValue = propMap.get(ConfigConstants.CONFIG_PROP_VALUE);
            customPropertyMap.put(propName, propValue);
        }

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, METHODNAME + " custom properties " + customPropertyMap);
        }
    }
681941
function declaration() {
        match(/^([;\s]*)+/); // ignore empty declarations + whitespace

        const comment_regexp = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
        let prop = match(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);

        if (!prop) {
            return;
        }

        prop = prop[0].trim();

        if (!match(/^:\s*/)) {
            return error('property missing \':\'');
        }

        // Quotes regex repeats verbatim inside and outside parentheses
        const val = match(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/);
        const ret = {
            type    : 'declaration',
            property: prop.replace(comment_regexp, ''),
            value   : val ? val[0].replace(comment_regexp, '').trim() : ''
        };

        match(/^[;\s]*/);

        return ret;
    }
862691
private void markOrdinaryPropertyDirty
        (CodeBuilder b, StorableProperty ordinaryProperty)
    {
        int count = mAllProperties.size();

        int ordinal = 0;
        int andMask = 0xffffffff;
        int orMask = 0;
        boolean anyNonDerived = false;

        for (StorableProperty property : mAllProperties.values()) {
            if (!property.isDerived()) {
                anyNonDerived = true;
                if (property == ordinaryProperty) {
                    orMask |= PROPERTY_STATE_DIRTY << ((ordinal & 0xf) * 2);
                } else if (property.isJoin()) {
                    // Check to see if ordinary is an internal member of join property.
                    for (int i=property.getJoinElementCount(); --i>=0; ) {
                        if (ordinaryProperty == property.getInternalJoinElement(i)) {
                            andMask &= ~(PROPERTY_STATE_DIRTY << ((ordinal & 0xf) * 2));
                        }
                    }
                }
            }

            ordinal++;
            if ((ordinal & 0xf) == 0 || ordinal >= count) {
                if (anyNonDerived && (andMask != 0xffffffff || orMask != 0)) {
                    String stateFieldName = PROPERTY_STATE_FIELD_NAME + ((ordinal - 1) >> 4);
                    b.loadThis();
                    b.loadThis();
                    b.loadField(stateFieldName, TypeDesc.INT);
                    if (andMask != 0xffffffff) {
                        b.loadConstant(andMask);
                        b.math(Opcode.IAND);
                    }
                    if (orMask != 0) {
                        b.loadConstant(orMask);
                        b.math(Opcode.IOR);
                    }
                    b.storeField(stateFieldName, TypeDesc.INT);
                }

                andMask = 0xffffffff;
                orMask = 0;
                anyNonDerived = false;
            }
        }
    }
143315
private function setPropertyValue($entity, $propertyPath, $value)
    {
        if (!$this->propertyAccessor->isWritable($entity, $propertyPath)) {
            throw new CustomObjectException(
                sprintf('Property "%s::$%s" is not writable.', ClassUtils::getClass($entity), $propertyPath)
            );
        }

        $this->propertyAccessor->setValue($entity, $propertyPath, $value);
    }
1331175
function (name, newValue) {
		var property = this.getProperty(name);
		if (!property) {
			this.initProperty(name, newValue);
		}
		else {
			property.set(newValue);
		}
	}
542972
def _set_properties(self):
        """"""

        self.codetext_ctrl.SetToolTipString(_("Enter python code here."))
        self.apply_button.SetToolTipString(_("Apply changes to current macro"))
        self.splitter.SetBackgroundStyle(wx.BG_STYLE_COLOUR)
        self.result_ctrl.SetMinSize((10, 10))
1010885
public void applyProperties(Properties props) {
        Iterator<?> iter = props.keySet().iterator();
        while (iter.hasNext()) {
            String fullName = (String) iter.next();
            String value = props.getProperty(fullName).trim();
            if (fullName.indexOf(":") != -1 && value != null
                    && value.length() > 0) {
                String name = fullName.substring(fullName.lastIndexOf(":") + 1);
                if (fullName.startsWith("server:")) {
                    if (name.endsWith(".class")) {
                        m_className = value;
                    } else {
                        setParameterValue(name, value, true);
                    }
                } else if (fullName.startsWith("module.")) {
                    String role =
                            fullName.substring(7, fullName.lastIndexOf(":"));
                    ModuleConfiguration module = getModuleConfiguration(role);
                    if (module == null) {
                        module =
                                new ModuleConfiguration(new ArrayList<Parameter>(),
                                                        role,
                                                        null,
                                                        null);
                        m_moduleConfigurations.add(module);
                    }
                    if (name.endsWith(".class")) {
                        module.setClassName(value);
                    } else {
                        module.setParameterValue(name, value, true);
                    }
                } else if (fullName.startsWith("datastore.")) {
                    String id =
                            fullName.substring(10, fullName.lastIndexOf(":"));
                    DatastoreConfiguration datastore =
                            getDatastoreConfiguration(id);
                    if (datastore == null) {
                        datastore =
                                new DatastoreConfiguration(new ArrayList<Parameter>(),
                                                           id,
                                                           null);
                        m_datastoreConfigurations.add(datastore);
                    }
                    datastore.setParameterValue(name, value, true);
                }
            }
        }
    }