本文整理汇总了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));
}
示例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();
}
}
示例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();
}
}