edu.umd.cs.findbugs.xml

Class XMLAttributeList

public class XMLAttributeList extends Object

Helper class to format attributes in an XML tag.

Author: David Hovemeyer

Nested Class Summary
static classXMLAttributeList.NameValuePair
Constructor Summary
XMLAttributeList()
Constructor.
Method Summary
XMLAttributeListaddAttribute(String name, String value)
Add a single attribute name and value.
XMLAttributeListaddOptionalAttribute(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<XMLAttributeList.NameValuePair>iterator()
Return an Iterator over NameValuePairs.

Constructor Detail

XMLAttributeList

public XMLAttributeList()
Constructor. Creates an empty object.

Method Detail

addAttribute

public XMLAttributeList addAttribute(String name, String value)
Add a single attribute name and value.

Parameters: name the attribute name value the attribute value

Returns: this object (so calls to addAttribute() can be chained)

addOptionalAttribute

public XMLAttributeList addOptionalAttribute(String name, String value)
Add a single attribute name and value.

Parameters: name the attribute name value the attribute value

Returns: this object (so calls to addAttribute() can be chained)

getQuotedAttributeValue

public static String getQuotedAttributeValue(String rawValue)
Return a properly quoted form for an attribute value.

Parameters: rawValue the raw value of the attribute

Returns: a properly quoted representation of the value

iterator

public Iterator<XMLAttributeList.NameValuePair> iterator()
Return an Iterator over NameValuePairs.
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.