Package org.dom4j

Examples of org.dom4j.Node.valueOf()


                String query = "/FindbugsPlugin/BugCode[@abbrev='" + abbrev + "']";
                Node fbNode = pluginDescriptor.selectSingleNode(query);
                int cweid = 0;
                if (fbNode != null) {
                    try {
                        cweid = Integer.parseInt(fbNode.valueOf("@cweid"));
                    } catch (RuntimeException e) {
                        assert true; // ignore
                    }
                }
                BugCode bugCode = new BugCode(abbrev, description, cweid);
View Full Code Here


        }

        // If an engine registrar is specified, make a note of its classname
        Node node = pluginDescriptor.selectSingleNode("/FindbugsPlugin/EngineRegistrar");
        if (node != null) {
            String engineClassName = node.valueOf("@class");
            if (engineClassName == null) {
                throw new PluginException("EngineRegistrar element with missing class attribute");
            }

            try {
View Full Code Here

             * , String
             * detectorCategoryElementName
             */) throws PluginException {
        Node node = constraintElement.selectSingleNode("./" + singleDetectorElementName);
        if (node != null) {
            String detectorClass = node.valueOf("@class");
            return new SingleDetectorFactorySelector(plugin, detectorClass);
        }

        node = constraintElement.selectSingleNode("./" + singleDetectorElementName + "Category");
        if (node != null) {
View Full Code Here

            return new SingleDetectorFactorySelector(plugin, detectorClass);
        }

        node = constraintElement.selectSingleNode("./" + singleDetectorElementName + "Category");
        if (node != null) {
            boolean spanPlugins = Boolean.valueOf(node.valueOf("@spanplugins")).booleanValue();

            String categoryName = node.valueOf("@name");
            if (!categoryName.equals("")) {
                if (categoryName.equals("reporting")) {
                    return new ReportingDetectorFactorySelector(spanPlugins ? null : plugin);
View Full Code Here

        node = constraintElement.selectSingleNode("./" + singleDetectorElementName + "Category");
        if (node != null) {
            boolean spanPlugins = Boolean.valueOf(node.valueOf("@spanplugins")).booleanValue();

            String categoryName = node.valueOf("@name");
            if (!categoryName.equals("")) {
                if (categoryName.equals("reporting")) {
                    return new ReportingDetectorFactorySelector(spanPlugins ? null : plugin);
                } else if (categoryName.equals("training")) {
                    return new ByInterfaceDetectorFactorySelector(spanPlugins ? null : plugin, TrainingDetector.class);
View Full Code Here

            }
        }

        node = constraintElement.selectSingleNode("./" + singleDetectorElementName + "Subtypes");
        if (node != null) {
            boolean spanPlugins = Boolean.valueOf(node.valueOf("@spanplugins")).booleanValue();

            String superName = node.valueOf("@super");
            if (!superName.equals("")) {
                try {
                    Class<?> superClass = Class.forName(superName);
View Full Code Here

        node = constraintElement.selectSingleNode("./" + singleDetectorElementName + "Subtypes");
        if (node != null) {
            boolean spanPlugins = Boolean.valueOf(node.valueOf("@spanplugins")).booleanValue();

            String superName = node.valueOf("@super");
            if (!superName.equals("")) {
                try {
                    Class<?> superClass = Class.forName(superName);
                    return new ByInterfaceDetectorFactorySelector(spanPlugins ? null : plugin, superClass);
                } catch (ClassNotFoundException e) {
View Full Code Here

            if (fName.endsWith(".gz")) {
                in = new GZIPInputStream(in);
            }
            doc = reader.read(in);
            Node summary = doc.selectSingleNode("/BugCollection/FindBugsSummary");
            double cpu_seconds = Double.parseDouble(summary.valueOf("@cpu_seconds"));
            putStats("cpu_seconds", i, (int) (cpu_seconds * 1000));
            double gc_seconds = Double.parseDouble(summary.valueOf("@gc_seconds"));
            putStats("gc_seconds", i, (int) (gc_seconds * 1000));

            List<Node> profileNodes = XMLUtil.selectNodes(doc, "/BugCollection/FindBugsSummary/FindBugsProfile/ClassProfile");
View Full Code Here

            }
            doc = reader.read(in);
            Node summary = doc.selectSingleNode("/BugCollection/FindBugsSummary");
            double cpu_seconds = Double.parseDouble(summary.valueOf("@cpu_seconds"));
            putStats("cpu_seconds", i, (int) (cpu_seconds * 1000));
            double gc_seconds = Double.parseDouble(summary.valueOf("@gc_seconds"));
            putStats("gc_seconds", i, (int) (gc_seconds * 1000));

            List<Node> profileNodes = XMLUtil.selectNodes(doc, "/BugCollection/FindBugsSummary/FindBugsProfile/ClassProfile");
            for(Node n : profileNodes) {
                String name = n.valueOf("@name");
View Full Code Here

        // we ignore the attribute name then
        return ((Attribute)node).getValue();
      }
      else if (node != null)
      {
        return node.valueOf("@" + attrName);
      }
        else
        {
            return null;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.