Decorator: @attr

Adds the name of the identifier attribute to
the metadata manager.

This will be used by the framework so it knows what
are the model identifier.

@param proto
@param attrName
511206
function identifier(proto, attrName) {
    var metadataManager = Vessel$$1.$container.get('@metadata_manager'), className = proto.getClassName();
    metadataManager.setIdentifier(className, attrName);
}
828618
public static Object getMBeanAttributeObject(String name, String attrName) throws JMException
   {
      MBeanServer server = getMBeanServer();
      ObjectName objName = new ObjectName(name);

      return server.getAttribute(objName, attrName);
   }
368095
def set_attr(self):
        
        setattr(self.attrs, self.kind_attr, self.values)
        setattr(self.attrs, self.meta_attr, self.meta)
        if self.dtype is not None:
            setattr(self.attrs, self.dtype_attr, self.dtype)
68693
static final String attr(Element element, String name) {
        return attr(element, name, true);
    }
299653
def model_attr(attr_name):
    

    def model_attr(_value, context, **_params):
        value = getattr(context["model"], attr_name)
        return _attr(value)

    return model_attr
901086
def parse_attr_signature(sig):
    
    match = ATTR_SIG_RE.match(sig.strip())
    if not match:
        raise RuntimeError('Attribute signature invalid, got ' + sig)
    name, _, params = match.groups()
    if params is not None and params.strip() != '':
        params = split_sig(params)
        params = [parse_param_signature(x) for x in params]
    else:
        params = []
    return (name, params)
198803
def define_attr_writer(name, type)
      define_method("#{name}=") do |value|
        unless value.kind_of?(type)
          value = coerce(value, to: type)
          unless value.kind_of?(type)
            raise TypeError, "Attribute `#{name}` only accepts `#{type}` but got `#{value}`:`#{value.class}` instead"
          end
        end
        instance_variable_set("@#{name}", value)
      end
    end
907636
def float(attr, metadata={})
      add_attribute(attr, :float, metadata)
      define_method("#{attr}=") do |arg|
        instance_variable_set("@#{attr}", arg.nil? ? nil : arg.to_f)
      end
    end
69365
protected function setAttrName($attrName)
	{
		if (!property_exists($this, 'attrName'))
		{
			throw new RuntimeException("Unknown property 'attrName'");
		}

		$this->attrName = AttributeName::normalize($attrName);
	}
1336363
function isJSXAttributeOfName(attr, name) {
  return t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name, { name: name });
}
573542
def add_attr2fields(self, attr_name, attr_val, fields=[], exclude=[], include_all_if_empty=True):
        
        for f in self.filter_fields(fields, exclude, include_all_if_empty):
            f = self.fields[f.name]
            org_val = f.widget.attrs.get(attr_name, '')
            f.widget.attrs[attr_name] = '%s %s' % (org_val, attr_val) if org_val else attr_val
587248
public synchronized void insert_attr(int attr)
	{

//
// Insert elt in the box
//

		box[insert_elt].req_type = Req_Attribute;
		box[insert_elt].attr_type = attr;
		box[insert_elt].op_type = Op_Unknown;
		box[insert_elt].when = new Date();

//
// get client address
//

		get_client_host();
			
//
// manage insert and read indexes
//

		inc_indexes();
	}
948786
private void registerMandatoryAttributes(Attributes attributes) {
    // see https://sourceforge.net/p/jerichohtml/discussion/350024/thread/501a7d05/
    Map<String, String> attrs = context.getMandatoryAttributes();
    if (!attrs.isEmpty()) {
      for (Entry<String, String> i : attrs.entrySet()) {
        String v = i.getValue();
        if (v == null) {
          outputDocument.insert(attributes.getBegin(), " " + i.getKey() + " ");
        } else {
          outputDocument.insert(attributes.getBegin(), " " + i.getKey() + "\"" + v + "\" ");
        }
      }
    }
  }
40297
HtmlTag attr(String name, String value) {
        if (attrs == null) {
            attrs = new HashMap<>();
        }
        attrs.put(name, value);
        return this;
    }
888953
protected synchronized void fireAttributeAddedEvent(String name, AttributeValue attr) {
		if (this.listenerList != null && isEventFirable()) {
			final AttributeChangeListener[] list = new AttributeChangeListener[this.listenerList.size()];
			this.listenerList.toArray(list);
			final AttributeChangeEvent event = new AttributeChangeEvent(
					this,
					Type.ADDITION,
					null,
					null,
					name,
					attr);
			for (final AttributeChangeListener listener : list) {
				listener.onAttributeChangeEvent(event);
			}
		}
	}
1225730
function(elem, attr) {
		// for each attributeName
		for (var name in attr) {
			if (attr.hasOwnProperty(name)) {
				// attributes
				elem.setAttribute(name, attr[name]);
			}
		}
		return elem;
	}
1051423
def set_attr(self, name, value):
    
    self.exec_script("node.setAttribute(%s, %s)" % (repr(name), repr(value)))