Package edu.umd.cs.findbugs.xml
Class XMLOutputUtil
java.lang.Object
edu.umd.cs.findbugs.xml.XMLOutputUtil
Utility routines for writing to XMLOutput.
- Author:
- David Hovemeyer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteCollection(XMLOutput xmlOutput, Collection<? extends XMLWriteable> collection) Write a Collection of XMLWriteable objects.static voidwriteElementList(XMLOutput xmlOutput, String tagName, Iterable<String> listValues) Write a list of Strings to document as elements with given tag name.static voidwriteElementList(XMLOutput xmlOutput, String tagName, Iterator<String> listValueIterator) Write a list of Strings to document as elements with given tag name.static voidwriteFileList(XMLOutput xmlOutput, String tagName, Iterable<File> listValues) Write a list of Strings to document as elements with given tag name.static voidwriteFileList(XMLOutput xmlOutput, String tagName, Iterator<File> listValueIterator) Write a list of Strings to document as elements with given tag name.
-
Constructor Details
-
XMLOutputUtil
public XMLOutputUtil()
-
-
Method Details
-
writeElementList
public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterable<String> listValues) throws IOException Write a list of Strings to document as elements with given tag name.- Parameters:
xmlOutput- the XMLOutput object to write totagName- the tag namelistValues- Collection of String values to write- Throws:
IOException
-
writeElementList
public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterator<String> listValueIterator) throws IOException Write a list of Strings to document as elements with given tag name.- Parameters:
xmlOutput- the XMLOutput object to write totagName- the tag namelistValueIterator- Iterator over String values to write- Throws:
IOException
-
writeFileList
public static void writeFileList(XMLOutput xmlOutput, String tagName, Iterable<File> listValues) throws IOException Write a list of Strings to document as elements with given tag name.- Parameters:
xmlOutput- the XMLOutput object to write totagName- the tag namelistValues- Collection of String values to write- Throws:
IOException
-
writeFileList
public static void writeFileList(XMLOutput xmlOutput, String tagName, Iterator<File> listValueIterator) throws IOException Write a list of Strings to document as elements with given tag name.- Parameters:
xmlOutput- the XMLOutput object to write totagName- the tag namelistValueIterator- Iterator over String values to write- Throws:
IOException
-
writeCollection
public static void writeCollection(XMLOutput xmlOutput, Collection<? extends XMLWriteable> collection) throws IOException Write a Collection of XMLWriteable objects.- Parameters:
xmlOutput- the XMLOutput object to write tocollection- Collection of XMLWriteable objects- Throws:
IOException
-