本文整理汇总了Java中edu.umd.cs.findbugs.filter.FirstVersionMatcher类的典型用法代码示例。如果您正苦于以下问题:Java FirstVersionMatcher类的具体用法?Java FirstVersionMatcher怎么用?Java FirstVersionMatcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FirstVersionMatcher类属于edu.umd.cs.findbugs.filter包,在下文中一共展示了FirstVersionMatcher类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeMatcher
import edu.umd.cs.findbugs.filter.FirstVersionMatcher; //导入依赖的package包/类
private static Matcher makeMatcher(Sortables s, BugInstance bug) {
switch (s) {
case BUGCODE:
return new BugMatcher(s.getFrom(bug), null, null);
case CATEGORY:
return new BugMatcher(null, null, s.getFrom(bug));
case CLASS:
return new ClassMatcher(s.getFrom(bug));
case DESIGNATION:
return new DesignationMatcher(s.getFrom(bug));
case FIRSTVERSION:
return new FirstVersionMatcher(s.getFrom(bug), RelationalOp.EQ);
case LASTVERSION:
return new LastVersionMatcher(s.getFrom(bug), RelationalOp.EQ);
case PACKAGE:
String p = Sortables.CLASS.getFrom(bug);
int lastDot = p.lastIndexOf('.');
if (lastDot > 0)
p = p.substring(0, lastDot);
return new ClassMatcher("~" + p + "\\.[^.]+");
case PRIORITY:
return new PriorityMatcher(Integer.toString(bug.getPriority()));
case TYPE:
return new BugMatcher(null, s.getFrom(bug), null);
case BUG_RANK:
return new RankMatcher(s.getFrom(bug));
case DIVIDER:
default:
throw new IllegalArgumentException("Don't know how to make maker for " + s);
}
}