Package edu.umd.cs.findbugs.xml

Examples of edu.umd.cs.findbugs.xml.XMLAttributeList


        return relOp.check(bugInstance.getLastVersion(), version);
    }

    @Override
    public void writeXML(XMLOutput xmlOutput, boolean disabled) throws IOException {
        XMLAttributeList attributes = new XMLAttributeList().addAttribute("value", Long.toString(version)).addAttribute("relOp",
                relOp.getName());
        if (disabled) {
            attributes.addAttribute("disabled", "true");
        }
        xmlOutput.openCloseTag("LastVersion", attributes);
    }
View Full Code Here


        return true;
    }

    @Override
    public void writeXML(XMLOutput xmlOutput, boolean disabled) throws IOException {
        XMLAttributeList attributes = new XMLAttributeList().addAttribute("name", name.getSpec());
        if (disabled) {
            attributes.addAttribute("disabled", "true");
        }
        xmlOutput.openCloseTag("Local", attributes);
    }
View Full Code Here

    @Override
    public void writePrologue(XMLOutput xmlOutput) throws IOException {
        xmlOutput.beginDocument();
        xmlOutput.openTag(
                ROOT_ELEMENT_NAME,
                new XMLAttributeList().addAttribute("version", analysisVersion)
                .addAttribute("sequence", String.valueOf(getSequenceNumber()))
                .addAttribute("timestamp", String.valueOf(getTimestamp()))
                .addAttribute("analysisTimestamp", String.valueOf(getAnalysisTimestamp()))
                .addAttribute("release", getReleaseName()));
        project.writeXML(xmlOutput, null, this);
View Full Code Here

            BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(bugType);
            if (bugPattern == null) {
                continue;
            }

            XMLAttributeList attributeList = new XMLAttributeList();
            attributeList.addAttribute("type", bugType);
            attributeList.addAttribute("abbrev", bugPattern.getAbbrev());
            attributeList.addAttribute("category", bugPattern.getCategory());
            if (bugPattern.getCWEid() != 0) {
                attributeList.addAttribute("cweid", Integer.toString(bugPattern.getCWEid()));
            }
            xmlOutput.openTag("BugPattern", attributeList);

            xmlOutput.openTag("ShortDescription");
            xmlOutput.writeText(bugPattern.getShortDescription());
View Full Code Here

            String bugCodeDescription = bugCode.getDescription();
            if (bugCodeDescription == null) {
                continue;
            }

            XMLAttributeList attributeList = new XMLAttributeList();
            attributeList.addAttribute("abbrev", bugCodeAbbrev);
            if (bugCode.getCWEid() != 0) {
                attributeList.addAttribute("cweid", Integer.toString(bugCode.getCWEid()));
            }
            xmlOutput.openTag("BugCode", attributeList);

            xmlOutput.openTag("Description");
            xmlOutput.writeText(bugCodeDescription);
View Full Code Here

            String bugCatDescription = I18N.instance().getBugCategoryDescription(bugCat);
            if (bugCatDescription == null) {
                continue;
            }

            XMLAttributeList attributeList = new XMLAttributeList();
            attributeList.addAttribute("category", bugCat);

            xmlOutput.openTag("BugCategory", attributeList);

            xmlOutput.openTag("Description");
            xmlOutput.writeText(bugCatDescription);
View Full Code Here

        }
    }

    private void emitErrors(XMLOutput xmlOutput) throws IOException {
        // System.err.println("Writing errors to XML output");
        XMLAttributeList attributeList = new XMLAttributeList();
        attributeList.addAttribute("errors", Integer.toString(errorList.size()));
        attributeList.addAttribute("missingClasses", Integer.toString(missingClassSet.size()));
        xmlOutput.openTag(ERRORS_ELEMENT_NAME, attributeList);

        // Emit Error elements describing analysis errors
        for (AnalysisError error : getErrors()) {
            xmlOutput.openTag(ERROR_ELEMENT_NAME);
View Full Code Here

     * .XMLOutput)
     */
    @Override
    public void writeXML(XMLOutput xmlOutput) throws IOException {
        xmlOutput.openCloseTag("Property",
                new XMLAttributeList().addAttribute("name", getName()).addAttribute("value", getValue()));
    }
View Full Code Here

        writeXML(xmlOutput, false, false);
    }

    @Override
    public void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException {
        XMLAttributeList attributeList = new XMLAttributeList().addAttribute("classname", getClassName());
        if (isPrimary) {
            attributeList.addAttribute("primary", "true");
        }

        String role = getDescription();
        if (!role.equals(DEFAULT_ROLE)) {
            attributeList.addAttribute("role", role);
        }

        xmlOutput.openTag(ELEMENT_NAME, attributeList);
        getSourceLines().writeXML(xmlOutput, addMessages, false);
        if (addMessages) {
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.xml.XMLAttributeList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.