/** * Set the attribute list, discarding previous contents. * * <p>This method allows an application writer to reuse an * attribute list easily.</p> * * @param atts The attribute list to copy. */ public void setAttributeList (AttributeList atts) { int count = atts.getLength(); clear(); for (int i = 0; i < count; i++) { addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i)); } }
/** * Sets the attributes for the wrapped element. * * @param attributes List of attributes defined in the XML for this * element. May be <code>null</code>. * @deprecated since 1.6.x. */ @Deprecated public synchronized void setAttributes(AttributeList attributes) { this.attributes = new AttributeListImpl(attributes); for (int i = 0; i < attributes.getLength(); i++) { setAttribute(attributes.getName(i), attributes.getValue(i)); } }
/** * Return the value of the specified attribute. * * @param The attribute's index. * @return The attribute's value. */ public String getValue (int i) { return qAtts.getValue(i); }
/** * Return the qualified (prefixed) name of the specified attribute. * * @param The attribute's index. * @return The attribute's qualified name, internalized. */ public String getQName (int i) { return qAtts.getName(i).intern(); }
/** * Return the length of the attribute list. * * @return The number of attributes in the list. * @see org.xml.sax.Attributes#getLength */ public int getLength () { return qAtts.getLength(); }
/** * Return the type of the specified attribute. * * @param The attribute's index. * @return The attribute's type as an internalized string. */ public String getType (int i) { return qAtts.getType(i).intern(); }
for (int i = 0, length = attrs.getLength(); i < length; i++) { String value = replaceProperties(project, attrs.getValue(i), project.getProperties()); try { ih.setAttribute(project, target, attrs.getName(i).toLowerCase(Locale.ENGLISH), value); } catch (BuildException be) { if (!attrs.getName(i).equals("id")) { throw be;
/** * Look up the value of an attribute by qualified (prefixed) name. * * @param qName The qualified name. * @return The attribute's value. */ public String getValue (String qName) { return qAtts.getValue(qName); }
/** * Look up an attribute index by qualified (prefixed) name. * * @param qName The qualified name. * @return The attributes index, or -1 if none was found. * @see org.xml.sax.Attributes#getIndex(java.lang.String) */ public int getIndex (String qName) { int max = atts.getLength(); for (int i = 0; i < max; i++) { if (qAtts.getName(i).equals(qName)) { return i; } } return -1; }
/** * Return the length of the attribute list. * * @return The number of attributes in the list. * @see org.xml.sax.Attributes#getLength */ public int getLength () { return qAtts.getLength(); }
/** * Look up the type of an attribute by qualified (prefixed) name. * * @param qName The qualified name. * @return The attribute's type as an internalized string. */ public String getType (String qName) { return qAtts.getType(qName).intern(); }
int length = qAtts.getLength(); String attQName = qAtts.getName(i); prefix = attQName.substring(n+1); String value = qAtts.getValue(i); if (!nsSupport.declarePrefix(prefix, value)) { reportError("Illegal Namespace prefix: " + prefix); String attQName = qAtts.getName(i); String type = qAtts.getType(i); String value = qAtts.getValue(i);
/** * Scans an attribute list for the <code>id</code> attribute and * stores a reference to the target object in the project if an * id is found. * <p> * This method was moved out of the configure method to allow * it to be executed at parse time. * * @see #configure(Object,AttributeList,Project) */ private void configureId(Object target, AttributeList attr) { String id = attr.getValue("id"); if (id != null) { project.addReference(id, target); } } }
/** * Return the qualified (prefixed) name of the specified attribute. * * @param The attribute's index. * @return The attribute's qualified name, internalized. */ public String getQName (int i) { return qAtts.getName(i).intern(); }
/** * Return the length of the attribute list. * * @return The number of attributes in the list. * @see org.xml.sax.Attributes#getLength */ public int getLength () { return qAtts.getLength(); }
/** * Return the type of the specified attribute. * * @param The attribute's index. * @return The attribute's type as an internalized string. */ public String getType (int i) { return qAtts.getType(i).intern(); }
/** * Return the value of the specified attribute. * * @param The attribute's index. * @return The attribute's value. */ public String getValue (int i) { return qAtts.getValue(i); }