Class XMLAttributeList
java.lang.Object
edu.umd.cs.findbugs.xml.XMLAttributeList
Helper class to format attributes in an XML tag.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(String name, String value) Add a single attribute name and value.addOptionalAttribute(String name, String value) Add a single attribute name and value.static StringgetQuotedAttributeValue(String rawValue) Return a properly quoted form for an attribute value.iterator()Return an Iterator over NameValuePairs.toString()Return the attribute list as a String which can be directly output as part of an XML tag.
-
Field Details
-
nameValuePairList
-
-
Constructor Details
-
XMLAttributeList
public XMLAttributeList()Constructor. Creates an empty object.
-
-
Method Details
-
addAttribute
Add a single attribute name and value.- Parameters:
name- the attribute namevalue- the attribute value- Returns:
- this object (so calls to addAttribute() can be chained)
-
addOptionalAttribute
Add a single attribute name and value.- Parameters:
name- the attribute namevalue- the attribute value- Returns:
- this object (so calls to addAttribute() can be chained)
-
toString
-
iterator
Return an Iterator over NameValuePairs. -
getQuotedAttributeValue
-