1 19 package edu.umd.cs.findbugs; 20 21 import java.io.IOException ; 22 23 import edu.umd.cs.findbugs.xml.XMLAttributeList; 24 import edu.umd.cs.findbugs.xml.XMLOutput; 25 26 31 public abstract class BugAnnotationUtil { 32 42 public static void writeXML( 43 XMLOutput xmlOutput, 44 String elementName, 45 BugAnnotation annotation, 46 XMLAttributeList attributeList, 47 boolean addMessages) throws IOException { 48 49 if (addMessages) { 50 xmlOutput.openTag(elementName, attributeList); 51 xmlOutput.openTag(BugAnnotation.MESSAGE_TAG); 52 xmlOutput.writeText(annotation.toString()); 53 xmlOutput.closeTag(BugAnnotation.MESSAGE_TAG); 54 xmlOutput.closeTag(elementName); 55 } else { 56 xmlOutput.openCloseTag(elementName, attributeList); 57 } 58 59 } 60 } 61 | Popular Tags |