当前位置: 首页>>代码示例>>Java>>正文


Java Plugin.getReleaseDate方法代码示例

本文整理汇总了Java中edu.umd.cs.findbugs.Plugin.getReleaseDate方法的典型用法代码示例。如果您正苦于以下问题:Java Plugin.getReleaseDate方法的具体用法?Java Plugin.getReleaseDate怎么用?Java Plugin.getReleaseDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.umd.cs.findbugs.Plugin的用法示例。


在下文中一共展示了Plugin.getReleaseDate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkPluginRelease

import edu.umd.cs.findbugs.Plugin; //导入方法依赖的package包/类
private void checkPluginRelease(Plugin plugin, Element maxEl) {
    @CheckForNull Date updateDate = parseReleaseDate(maxEl);
    @CheckForNull Date installedDate = plugin.getReleaseDate();
    if (updateDate != null && installedDate != null && updateDate.before(installedDate))
        return;
    String version = maxEl.attributeValue("version");
    if (version.equals(plugin.getVersion()))
        return;

    String url = maxEl.attributeValue("url");
    String message = maxEl.element("message").getTextTrim();

    pluginUpdates.add(new PluginUpdate(plugin, version, updateDate, url, message));
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:15,代码来源:UpdateChecker.java

示例2: writeXml

import edu.umd.cs.findbugs.Plugin; //导入方法依赖的package包/类
/** protected for testing */
protected final void writeXml(OutputStream out, Collection<Plugin> plugins, String entryPoint) throws IOException {
    OutputStreamXMLOutput xmlOutput = new OutputStreamXMLOutput(out);
    try {
        xmlOutput.beginDocument();

        xmlOutput.startTag("findbugs-invocation");
        xmlOutput.addAttribute("version", Version.RELEASE);
        String applicationName = Version.getApplicationName();
        if (applicationName == null || applicationName.equals("")) {
            int lastDot = entryPoint.lastIndexOf('.');
            if (lastDot == -1)
                applicationName = entryPoint;
            else
                applicationName = entryPoint.substring(lastDot + 1);
        }
        xmlOutput.addAttribute("app-name", applicationName);
        String applicationVersion = Version.getApplicationVersion();
        if (applicationVersion == null)
            applicationVersion = "";
        xmlOutput.addAttribute("app-version", applicationVersion);
        xmlOutput.addAttribute("entry-point", entryPoint);
        xmlOutput.addAttribute("os", SystemProperties.getProperty("os.name", ""));
        xmlOutput.addAttribute("java-version", getMajorJavaVersion());
        Locale locale = Locale.getDefault();
        xmlOutput.addAttribute("language", locale.getLanguage());
        xmlOutput.addAttribute("country", locale.getCountry());
        xmlOutput.addAttribute("uuid", getUuid());
        xmlOutput.stopTag(false);
        for (Plugin plugin : plugins) {
            xmlOutput.startTag("plugin");
            xmlOutput.addAttribute("id", plugin.getPluginId());
            xmlOutput.addAttribute("name", plugin.getShortDescription());
            xmlOutput.addAttribute("version", plugin.getVersion());
            Date date = plugin.getReleaseDate();
            if (date != null)
                xmlOutput.addAttribute("release-date", Long.toString(date.getTime()));
            xmlOutput.stopTag(true);
        }

        xmlOutput.closeTag("findbugs-invocation");
        xmlOutput.flush();
    } finally {
        xmlOutput.finish();
    }
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:47,代码来源:UpdateChecker.java

示例3: writeXml

import edu.umd.cs.findbugs.Plugin; //导入方法依赖的package包/类
/** protected for testing */
protected final void writeXml(OutputStream out, Collection<Plugin> plugins, String entryPoint,
        boolean finish) throws IOException {
    OutputStreamXMLOutput xmlOutput = new OutputStreamXMLOutput(out);
    try {
        xmlOutput.beginDocument();

        xmlOutput.startTag("findbugs-invocation");
        xmlOutput.addAttribute("version", Version.RELEASE);
        String applicationName = Version.getApplicationName();
        if (applicationName == null || applicationName.equals("")) {
            int lastDot = entryPoint.lastIndexOf('.');
            if (lastDot == -1)
                applicationName = entryPoint;
            else
                applicationName = entryPoint.substring(lastDot + 1);
        }
        xmlOutput.addAttribute("app-name", applicationName);
        String applicationVersion = Version.getApplicationVersion();
        if (applicationVersion == null)
            applicationVersion = "";
        xmlOutput.addAttribute("app-version", applicationVersion);
        xmlOutput.addAttribute("entry-point", entryPoint);
        xmlOutput.addAttribute("os", SystemProperties.getProperty("os.name", ""));
        xmlOutput.addAttribute("java-version", getMajorJavaVersion());
        Locale locale = Locale.getDefault();
        xmlOutput.addAttribute("language", locale.getLanguage());
        xmlOutput.addAttribute("country", locale.getCountry());
        xmlOutput.addAttribute("uuid", getUuid());
        xmlOutput.stopTag(false);
        for (Plugin plugin : plugins) {
            xmlOutput.startTag("plugin");
            xmlOutput.addAttribute("id", plugin.getPluginId());
            xmlOutput.addAttribute("name", plugin.getShortDescription());
            xmlOutput.addAttribute("version", plugin.getVersion());
            Date date = plugin.getReleaseDate();
            if (date != null)
                xmlOutput.addAttribute("release-date", Long.toString(date.getTime()));
            xmlOutput.stopTag(true);
        }

        xmlOutput.closeTag("findbugs-invocation");
        xmlOutput.flush();
    } finally {
        if (finish)
            xmlOutput.finish();
    }
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:49,代码来源:UpdateChecker.java


注:本文中的edu.umd.cs.findbugs.Plugin.getReleaseDate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。