*
Sets the size of an element, if the policy requires it
@param element
@param policy
@param attribute
540235
function (element, policy, attribute) {
        if (policy === POLICY_IN || policy === POLICY_BOTH) {
            element.set(attribute, element.$el[attributeMap[attribute]]);
        }
    }
150638
public void addAttribute(String attribute)
    {
        if(this.attributes == null)
            this.attributes = new ArrayList<String>();
        this.attributes.add(attribute);
    }
903252
@SuppressWarnings("unchecked") // Checked with an instanceof check
    public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(POLICIES)) {
            if (!(obj instanceof List)) {
                throw new IOException("Attribute value should be of type List.");
            }
            certPolicies = (List<PolicyInformation>)obj;
        } else {
          throw new IOException("Attribute name [" + name +
                                "] not recognized by " +
                                "CertAttrSet:CertificatePoliciesExtension.");
        }
        encodeThis();
    }
442581
function( attributes ) {
    let property;

    for ( property in attributes ) {
      if ( attributes.hasOwnProperty( property ) ) {
        this.element.setAttribute( property, attributes[property] );
      }
    }
  }
1180849
public static void setAttribute(String key, Object value) {
        assertInitialized();
        getAppFramework().setAttribute(key, value);
    }
673197
public void setWidth(java.lang.String width) {
        getStateHelper().put(PropertyKeys.width, width);
        handleAttribute("width", width);
    }
432473
public void setContainer(final String container) {
        if (container != null)
            attrMixin.setAttribute(CONTAINER, container);
        else
            attrMixin.removeAttribute(CONTAINER);
    }
618876
@Override
    public void setAttribute(String name, Object value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Setting attribute: " + name);
        }
        this.attributes.put(name, value);
    }
133413
public void setSize(int newWidth, int newHeight) {
		this.width = newWidth;
		this.height = newHeight;

		if (helper.getRootElement() != null) {
			applyElementSize(helper.getRootElement(), newWidth, newHeight, false);
			Dom.setStyleAttribute(helper.getRootElement(), "clip", "rect(0 " + newWidth + "px " + newHeight + "px 0)");
		} else {
			SC.logWarn("problems");
		}
	}
926150
void setRuleMessage(XmlModelWriter xw, ValidatorRule rule, Element element)
    {
        String messageKey = rule.getMessageKey();
        String message = rule.getMessage();

        if ( messageKey != null || message != null )
        {
            Element msgElementToUse = findChildElement(xw, element, "msg", "name", rule.getRuleName(), true, null);
            setElementAttribute(msgElementToUse, "resource", true);

            if ( messageKey != null )
            {
                setElementAttribute(msgElementToUse, "key", messageKey);
                if (_isValidatorOneOne) {
                    setElementAttribute(msgElementToUse, "bundle", rule.getBundle());
                }
            }
            else // message != null (it's a hardcoded message)
            {
                // Add our special constant as the message key, append the hardcoded message to it.
                setElementAttribute(msgElementToUse, "key", ValidatorConstants.EXPRESSION_KEY_PREFIX + message);
            }
        }
    }
283642
static
  public
  void configure (Element element) {
    DOMConfigurator configurator = new DOMConfigurator();
    configurator.doConfigure(element,  LogManager.getLoggerRepository());
  }
304401
public void setAttribute(String key, Object attribute) {

		if (!isValid())
			throw new IllegalStateException(
					"Can not bind object to session that has been invalidated!!");

		if (key == null)
			throw new NullPointerException(
					"Name of attribute to bind cant be null!!!");
		if (attribute == null)
			throw new NullPointerException(
					"Attribute that is to be bound cant be null!!!");

		// Construct an event with the new value
		SipApplicationSessionBindingEvent event = null;

        // Call the valueBound() method if necessary
        if (attribute instanceof SipApplicationSessionBindingListener) {
            // Don't call any notification if replacing with the same value
            Object oldValue = getAttributeMap().get(key);
            if (attribute != oldValue) {
            	event = new SipApplicationSessionBindingEvent(this, key);
                try {
                    ((SipApplicationSessionBindingListener) attribute).valueBound(event);
                } catch (Throwable t){
                	logger.error("SipSessionBindingListener threw exception", t);
                }
            }
        }

		Object previousValue = this.getAttributeMap().put(key, attribute);

		if (previousValue != null && previousValue != attribute &&
	            previousValue instanceof SipApplicationSessionBindingListener) {
            try {
                ((SipApplicationSessionBindingListener) previousValue).valueUnbound
                    (new SipApplicationSessionBindingEvent(this, key));
            } catch (Throwable t) {
            	logger.error("SipSessionBindingListener threw exception", t);
            }
        }

		SipListeners listeners = sipContext.getListeners();
		List<SipApplicationSessionAttributeListener> listenersList = listeners.getSipApplicationSessionAttributeListeners();
		if(listenersList.size() > 0) {
			if(event == null) {
				event = new SipApplicationSessionBindingEvent(this, key);
			}
			if (previousValue == null) {
				for (SipApplicationSessionAttributeListener listener : listenersList) {
					if(logger.isDebugEnabled()) {
						logger.debug("notifying SipApplicationSessionAttributeListener " + listener.getClass().getCanonicalName() + " of attribute added on key "+ key);
					}
					try {
						listener.attributeAdded(event);
					} catch (Throwable t) {
						logger.error("SipApplicationSessionAttributeListener threw exception", t);
					}
				}
			} else {
				for (SipApplicationSessionAttributeListener listener : listenersList) {
					if(logger.isDebugEnabled()) {
						logger.debug("notifying SipApplicationSessionAttributeListener " + listener.getClass().getCanonicalName() + " of attribute replaced on key "+ key);
					}
					try {
						listener.attributeReplaced(event);
					} catch (Throwable t) {
						logger.error("SipApplicationSessionAttributeListener threw exception", t);
					}
				}
			}
		}
	}
554121
public void set(Element element) {
        if (element == null) {
            throw new NullPointerException("element == null");
        }

        CstString pairName = new CstString(element.getName());
        Constant pairValue = Element.toConstant(element.getValue());
        NameValuePair nameValuePair = new NameValuePair(pairName, pairValue);
        elements.put(element.getName(), nameValuePair);
    }
192460
public void setAttribute(Attribute attribute) {
		if (!updateMode) {
			originalAttrs.put(attribute);
		}
		else {
			updatedAttrs.put(attribute);
		}
	}
380463
public final void setElement(final WebElement element) {

		if (element == null) {
			throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"element"));
		}

		this.element = element;

		validateElementTag();
		validateAttributes();
	}
1085844
public void setAttribute(String name, Object o) {
		if(logger.isDebugEnabled()) {
        	logger.debug("setAttribute - name=" + name + ", object=" + o);
        }
		if (name == null)
			throw new NullPointerException("Attribute name can not be null.");
		this.getAttributeMap().put(name, o);
	}
1235698
public static void setAtt(Element el, String name, int d) {
    el.setAttribute(name, Integer.toString(d));
  }