本文整理汇总了Java中edu.umd.cs.findbugs.BugCategory类的典型用法代码示例。如果您正苦于以下问题:Java BugCategory类的具体用法?Java BugCategory怎么用?Java BugCategory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BugCategory类属于edu.umd.cs.findbugs包,在下文中一共展示了BugCategory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPatternDetails
import edu.umd.cs.findbugs.BugCategory; //导入依赖的package包/类
private String getPatternDetails() {
if (pattern == null) {
return "";
}
StringBuilder sb = new StringBuilder("<b>Pattern</b>: ");
sb.append(pattern.getType());
sb.append("\n<br><b>Type</b>: ").append(pattern.getAbbrev()).append(", <b>Category</b>: ");
sb.append(pattern.getCategory());
BugCategory category = DetectorFactoryCollection.instance().getBugCategory(pattern.getCategory());
if(category != null) {
sb.append(" (");
sb.append(category.getShortDescription());
sb.append(")");
}
return sb.toString();
}
示例2: addCategoryKey
import edu.umd.cs.findbugs.BugCategory; //导入依赖的package包/类
private void addCategoryKey(String argument) {
DetectorFactoryCollection i18n = DetectorFactoryCollection.instance();
for (String x : argument.split("[,|]")) {
for (BugCategory category : i18n.getBugCategoryObjects()) {
if (category.getAbbrev().equals(x) || category.getCategory().equals(x)) {
this.categoryKey.add(category.getCategory());
break;
}
}
}
}
示例3: getTitle
import edu.umd.cs.findbugs.BugCategory; //导入依赖的package包/类
String getTitle(BugGroup group) {
Object data = group.getData();
if(data == null){
return null;
}
switch (group.getType()) {
case Marker:
return getTitle((IMarker) data);
case Pattern:
return getTitle((BugPattern) data);
case PatternType:
return getTitle((BugCode) data);
case Category:
return getTitle((BugCategory) data);
case Confidence:
return getTitle((MarkerConfidence)data);
case BugRank:
return getTitle((MarkerRank)data);
case Package:
return getTitle((IPackageFragment) data);
case Project:
return getTitle((IProject) data);
case Class:
return getTitle((IJavaElement) data);
case DetectorPlugin:
return getTitle((Plugin) data);
default:
break;
}
return null;
}