Set the properites for the object that match the
<code>prefix</code> passed as parameter.
554589
public
  void setProperties(Properties properties, String prefix) {
    int len = prefix.length();

    for (Enumeration e = properties.propertyNames(); e.hasMoreElements(); ) {
      String key = (String) e.nextElement();

      // handle only properties that start with the desired frefix.
      if (key.startsWith(prefix)) {


	    // ignore key if it contains dots after the prefix
        if (key.indexOf('.', len + 1) > 0) {
	      //System.err.println("----------Ignoring---["+key
	      //	     +"], prefix=["+prefix+"].");
	      continue;
	    }

	    String value = OptionConverter.findAndSubst(key, properties);
        key = key.substring(len);
        if (("layout".equals(key) || "errorHandler".equals(key) || "appenders".equals(key)) && obj instanceof Appender) {
          continue;
        }
        //
        //   if the property type is an OptionHandler
        //     (for example, triggeringPolicy of org.apache.log4j.rolling.RollingFileAppender)
        PropertyDescriptor prop = getPropertyDescriptor(Introspector.decapitalize(key));
        if (prop != null
                && OptionHandler.class.isAssignableFrom(prop.getPropertyType())
                && prop.getWriteMethod() != null) {
            OptionHandler opt = (OptionHandler)
                    OptionConverter.instantiateByKey(properties, prefix + key,
                                  prop.getPropertyType(),
                                  null);
            PaxPropertySetter setter = new PaxPropertySetter(opt);
            setter.setProperties(properties, prefix + key + ".");
            try {
                prop.getWriteMethod().invoke(this.obj, new Object[] { opt });
            } catch(IllegalAccessException ex) {
                LogLog.warn("Failed to set property [" + key +
                            "] to value \"" + value + "\". ", ex);
            } catch(InvocationTargetException ex) {
                if (ex.getTargetException() instanceof InterruptedException
                        || ex.getTargetException() instanceof InterruptedIOException) {
                    Thread.currentThread().interrupt();
                }
                LogLog.warn("Failed to set property [" + key +
                            "] to value \"" + value + "\". ", ex);
            } catch(RuntimeException ex) {
                LogLog.warn("Failed to set property [" + key +
                            "] to value \"" + value + "\". ", ex);
            }
            continue;
        }
        else if (prop != null
                    && OptionFactory.class.isAssignableFrom(prop.getPropertyType())
                    && prop.getWriteMethod() != null)
        {
            OptionFactory factory = new ObjectFactory(properties, prefix + key);
            try {
                prop.getWriteMethod().invoke(this.obj, new Object[] { factory });
            } catch(IllegalAccessException ex) {
                LogLog.warn("Failed to set property [" + key +
                            "] to value \"" + value + "\". ", ex);
            } catch(InvocationTargetException ex) {
                if (ex.getTargetException() instanceof InterruptedException
                        || ex.getTargetException() instanceof InterruptedIOException) {
                    Thread.currentThread().interrupt();
                }
                LogLog.warn("Failed to set property [" + key +
                            "] to value \"" + value + "\". ", ex);
            } catch(RuntimeException ex) {
                LogLog.warn("Failed to set property [" + key +
                            "] to value \"" + value + "\". ", ex);
            }
            continue;
        }

        setProperty(key, value);
      }
    }
    activate();
  }
532410
public static Collection listPropertiesWithPrefix(Properties props, String prefix) {
        final HashSet set = new HashSet();
        for (Iterator i = props.keySet().iterator(); i.hasNext();) {
            String key = (String) i.next();
            if (key.startsWith(prefix)) {
                set.add(props.getProperty(key));
            }
        }
        return set;
    }
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);
        }
    }
843635
public void setParamsWithProperty(BitSet nonNullSet) {
        for (int i = 0; i < 32; ++i) {
            setParamWithProperty(i, nonNullSet.get(i));
        }
    }
111705
private void initializePrefixes()
	{
		if (namespaceMap == null) {
			// TODO use logger
			System.err
					.println("Cannot use whitespace filter without initializing the namespace-prefix map for the current Wikipedia language version. DISABLING FILTER.");
		}
		else {
			prefixesToAllow = new HashSet<String>();
			prefixesToReject = new HashSet<String>();

			for (Entry<Integer, String> namespace : namespaceMap.entrySet()) {
				if (allowedNamespaces.contains(namespace.getKey())) {
					prefixesToAllow.add(namespace.getValue() + ":");
				}
				else {
					prefixesToReject.add(namespace.getValue() + ":");
				}
			}
		}
	}
772260
def custom_object_prefix_strict(instance):
    
    if (instance['type'] not in enums.TYPES and
            instance['type'] not in enums.RESERVED_OBJECTS and
            not CUSTOM_TYPE_PREFIX_RE.match(instance['type'])):
        yield JSONError("Custom object type '%s' should start with 'x-' "
                        "followed by a source unique identifier (like a "
                        "domain name with dots replaced by hyphens), a hyphen "
                        "and then the name." % instance['type'],
                        instance['id'], 'custom-prefix')
1046910
private Set<String> calcPropertySourceNames(String prefix, Set<String> activeNames) {
        return ClientUtil.calcPropertySourceNames(prefix, activeNames, "_");
    }
655436
@Override
	public void setParameters(Map<String, ?> map) {
		if (isOpen) {
			throw new UnsupportedOperationException(MSG_CANNOT_CHANGE_PROP);
		}

		for (Entry<String, ?> entry : map.entrySet()) {
			if (this.driver.getOptions().hasOption(entry.getKey())) {
				String longKey = this.driver.getOptions().getOption(entry.getKey()).getLongOpt();
				this.parameters.put(longKey, entry.getValue() == null ? "" : entry.getValue().toString());
			} else {
				throw new UnsupportedOperationException(MSG_WRONG_ARGUMENT);
			}
		}
	}
237479
public UrlStringBuilder setParameters(String namespace, Map<String, List<String>> parameters) {
        for (final String name : parameters.keySet()) {
            Validate.notNull(name, "parameter map cannot contain any null keys");
        }

        this.parameters.clear();
        this.addParameters(namespace, parameters);
        return this;
    }
1140018
public void setDefaultPrefix(final String prefix) {
		lock.writeLock().lock();
		try {
			final String myPrefix = checkAndConvertPrefix(prefix);
			final List<String> prefixList = split(myPrefix);
			setDefaultPrefixes(prefixList);
		} finally {
			lock.writeLock().unlock();
		}
	}
245027
public void removePropsWithPrefix(String prefix) {
    this.specProperties.entrySet().removeIf(entry -> ((String) entry.getKey()).startsWith(prefix));

    Properties newCommonProperties = null;
    for (Object key: this.commonProperties.keySet()) {
      if (((String)key).startsWith(prefix)) {
        if (newCommonProperties == null) {
          newCommonProperties = new Properties();
          newCommonProperties.putAll(this.commonProperties);
        }
        newCommonProperties.remove(key);
      }
    }

    if (newCommonProperties != null) {
      this.commonProperties = newCommonProperties;
    }
  }
1057298
def set(self, name, value, default=False, imported=False):
        
        if name in self.__dict__:
            self.__dict__[name] = value
            return

        if name not in self.settings and self.prefix:
            prefix_name = '%s_%s' % (self.prefix, name)
            if prefix_name in self.settings:
                return  # don't do anything

        if name in self.settings:
            self.settings[name].set(value, default=default, imported=imported)
        elif not imported:
            self.params[name] = value
219932
public void setNamespaceURI(String prefix, String namespaceURI) {
    if (prefix == null)
      throw new IllegalArgumentException("Cannot bind null prefix");
    if (namespaceURI == null)
      throw new IllegalArgumentException("Cannot set prefix to null namespace URI");

    // no need to store
    if (XMLConstants.XML_NS_PREFIX.equals(prefix) || XMLConstants.XMLNS_ATTRIBUTE.equals(prefix))
      return;

    bindings.put(prefix, namespaceURI);
  }
1174236
public void setPrefix(String key, String prefix) {
		PdfName fieldname = new PdfName(key);
		PdfObject o = get(fieldname);
		if (o == null)
			throw new IllegalArgumentException("You must set a value before adding a prefix.");
		PdfDictionary dict = new PdfDictionary(PdfName.COLLECTIONSUBITEM);
		dict.put(PdfName.D, o);
		dict.put(PdfName.P, new PdfString(prefix, PdfObject.TEXT_UNICODE));
		put(fieldname, dict);
	}
1201512
public void setFillAntialias( Boolean value) {
    PropertyValue propertyValue = fillAntialias(value);
    constantPropertyUsageMap.put(PROPERTY_FILL_ANTIALIAS, propertyValue);
    layer.setProperties(propertyValue);
  }
366446
public void setParameters(Map<String, String> parameters) {
        if (parameters == null || parameters.isEmpty()) {
            this.parameterItemRuleMap = null;
        } else {
            ItemRuleMap itemRuleMap = new ItemRuleMap();
            for (Map.Entry<String, String> entry : parameters.entrySet()) {
                ItemRule ir = new ItemRule();
                ir.setTokenize(false);
                ir.setName(entry.getKey());
                ir.setValue(entry.getValue());
                itemRuleMap.putItemRule(ir);
            }
            this.parameterItemRuleMap = itemRuleMap;
        }
    }
620524
public void setPrefix(@Nonnull String prefixName, @Nonnull String prefix) {
        if (!isUsingDefaultShortFormProvider()) {
            resetShortFormProvider();
        }
        ((DefaultPrefixManager) shortFormProvider).setPrefix(prefixName, prefix);
    }