• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Detector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Detector类属于edu.umd.cs.findbugs包,在下文中一共展示了Detector类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getIntPriorityAsString

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
/**
 * Convert an integer warning priority threshold value to
 * a String.
 */
public static String getIntPriorityAsString(int prio) {
	String minPriority;
	switch (prio) {
		case Detector.EXP_PRIORITY:
			minPriority = ProjectFilterSettings.EXPERIMENTAL_PRIORITY;
			break;
		case Detector.LOW_PRIORITY:
			minPriority = ProjectFilterSettings.LOW_PRIORITY;
			break;
		case Detector.NORMAL_PRIORITY:
			minPriority = ProjectFilterSettings.MEDIUM_PRIORITY;
			break;
		case Detector.HIGH_PRIORITY:
			minPriority = ProjectFilterSettings.HIGH_PRIORITY;
			break;
		default:
			minPriority = ProjectFilterSettings.DEFAULT_PRIORITY;
			break;
	}
	return minPriority;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:ProjectFilterSettings.java


示例2: InjectionSink

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
/**
 * Constructs the instance and stores immutable values for reporting
 * 
 * @param detector detctor for reporting
 * @param bugType reported bug type
 * @param originalPriority original priority (without sink confirmation)
 * @param classContext class with the sink
 * @param method method with the sink
 * @param instructionHandle instruction with the sink
 * @param sinkMethod called method (sink)
 * @throws NullPointerException if any argument is null
 */
public InjectionSink(Detector detector, String bugType, int originalPriority,
        ClassContext classContext, Method method, InstructionHandle instructionHandle,
        String sinkMethod) {
    Objects.requireNonNull(detector, "detector");
    Objects.requireNonNull(bugType, "bugType");
    Objects.requireNonNull(classContext, "classContext");
    Objects.requireNonNull(method, "method");
    Objects.requireNonNull(instructionHandle, "instructionHandle");
    this.detector = detector;
    this.bugType = bugType;
    this.originalPriority = originalPriority;
    this.classContext = classContext;
    this.method = method;
    this.instructionHandle = instructionHandle;
    this.sinkMethod = (sinkMethod == null) ? "unknown" : sinkMethod;
}
 
开发者ID:blackarbiter,项目名称:Android_Code_Arbiter,代码行数:29,代码来源:InjectionSink.java


示例3: AnalysisRun

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
/**
 * Creates a new instance of AnalysisRun.
 */
public AnalysisRun(Project project, FindBugsFrame frame) {
    this.frame = frame;
    this.logger = frame.getLogger();
    this.reporter = new SwingGUIBugReporter(this);
    this.reporter.setPriorityThreshold(Detector.EXP_PRIORITY);

    // Create IFindBugsEngine
    FindBugs2 engine = new FindBugs2();
    engine.setBugReporter(reporter);
    engine.setProject(project);
    engine.setDetectorFactoryCollection(DetectorFactoryCollection.instance());

    this.findBugs = engine;
    this.treeModelMap = new HashMap<String, DefaultTreeModel>();
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:19,代码来源:AnalysisRun.java


示例4: getCellTextColor

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
private Color getCellTextColor() {
    // Based on the priority, color-code the bug instance.
    Color color = Color.BLACK;
    if (value instanceof BugInstance) {
        BugInstance bugInstance = (BugInstance) value;
        switch (bugInstance.getPriority()) {
        case Detector.EXP_PRIORITY:
            color = FindBugsFrame.EXP_PRIORITY_COLOR;
            break;
        case Detector.LOW_PRIORITY:
            color = FindBugsFrame.LOW_PRIORITY_COLOR;
            break;
        case Detector.NORMAL_PRIORITY:
            color = FindBugsFrame.NORMAL_PRIORITY_COLOR;
            break;
        case Detector.HIGH_PRIORITY:
            color = FindBugsFrame.HIGH_PRIORITY_COLOR;
            break;
        }
    }
    return color;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:23,代码来源:BugCellRenderer.java


示例5: testSetMinPriority

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
public void testSetMinPriority() {
	plain.setMinPriority("High");
	Assert.assertTrue(plain.getMinPriority().equals("High"));
	Assert.assertTrue(plain.getMinPriorityAsInt() == Detector.HIGH_PRIORITY);
	plain.setMinPriority("Medium");
	Assert.assertTrue(plain.getMinPriority().equals("Medium"));
	Assert.assertTrue(plain.getMinPriorityAsInt() == Detector.NORMAL_PRIORITY);
	plain.setMinPriority("Low");
	Assert.assertTrue(plain.getMinPriority().equals("Low"));
	Assert.assertTrue(plain.getMinPriorityAsInt() == Detector.LOW_PRIORITY);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:ProjectFilterSettingsTest.java


示例6: isActive

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
public boolean isActive(Class<? extends Detector> detectorClass) {
    return isActive(detectorClass.getName());
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:ExecutionPlan.java


示例7: highPriorityButtonActionPerformed

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
private void highPriorityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_highPriorityButtonActionPerformed
    setPriorityThreshold(Detector.HIGH_PRIORITY);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:FindBugsFrame.java


示例8: mediumPriorityButtonActionPerformed

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
private void mediumPriorityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mediumPriorityButtonActionPerformed
    setPriorityThreshold(Detector.NORMAL_PRIORITY);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:FindBugsFrame.java


示例9: lowPriorityButtonActionPerformed

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
private void lowPriorityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lowPriorityButtonActionPerformed
    setPriorityThreshold(Detector.LOW_PRIORITY);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:FindBugsFrame.java


示例10: expPriorityButtonActionPerformed

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
private void expPriorityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_expPriorityButtonActionPerformed
    setPriorityThreshold(Detector.EXP_PRIORITY);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:FindBugsFrame.java


示例11: getDetector

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
public Detector getDetector(BugReporter bugReporter) {
	return new CloneIdiom(bugReporter);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:CN_IDIOM_TestCase.java


示例12: getDetector

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
public Detector getDetector(BugReporter bugReporter) {
	return new FindHEmismatch(bugReporter);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:HE_EQUALS_USE_HASHCODE_TestCase.java


示例13: getDetector

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
public Detector getDetector(BugReporter bugReporter) {
	return new DumbMethods(bugReporter);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:DMI_RANDOM_USED_ONLY_ONCE_TestCase.java


示例14: getDetector

import edu.umd.cs.findbugs.Detector; //导入依赖的package包/类
public Detector getDetector(BugReporter bugReporter); 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:2,代码来源:FindbugsTestCase.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Configure类代码示例发布时间:2022-05-23
下一篇:
Java RiotLib类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap