本文整理匯總了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;
}