本文整理汇总了Java中edu.umd.cs.findbugs.FindBugsAnalysisFeatures类的典型用法代码示例。如果您正苦于以下问题:Java FindBugsAnalysisFeatures类的具体用法?Java FindBugsAnalysisFeatures怎么用?Java FindBugsAnalysisFeatures使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FindBugsAnalysisFeatures类属于edu.umd.cs.findbugs包,在下文中一共展示了FindBugsAnalysisFeatures类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reportNullDeref
import edu.umd.cs.findbugs.FindBugsAnalysisFeatures; //导入依赖的package包/类
private void reportNullDeref(WarningPropertySet<WarningProperty> propertySet, Location location, String type, int priority,
BugAnnotation cause, @CheckForNull BugAnnotation variable) {
BugInstance bugInstance = new BugInstance(this, type, priority).addClassAndMethod(classContext.getJavaClass(), method);
bugInstance.add(cause);
if (variable != null)
bugInstance.add(variable);
else
bugInstance.add(new LocalVariableAnnotation("?", -1, -1));
bugInstance.addSourceLine(classContext, method, location).describe("SOURCE_LINE_DEREF");
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
addPropertiesForDereferenceLocations(propertySet, Collections.singleton(location));
propertySet.decorateBugInstance(bugInstance);
bugReporter.reportBug(bugInstance);
}
示例2: reportNullDeref
import edu.umd.cs.findbugs.FindBugsAnalysisFeatures; //导入依赖的package包/类
private void reportNullDeref(WarningPropertySet<WarningProperty> propertySet, Location location, String type, int priority,
@CheckForNull
BugAnnotation variable) {
BugInstance bugInstance = new BugInstance(this, type, priority).addClassAndMethod(classContext.getJavaClass(), method);
if (variable != null)
bugInstance.add(variable);
else
bugInstance.add(new LocalVariableAnnotation("?", -1, -1));
bugInstance.addSourceLine(classContext, method, location).describe("SOURCE_LINE_DEREF");
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
addPropertiesForDereferenceLocations(propertySet, Collections.singleton(location), false);
propertySet.decorateBugInstance(bugInstance);
bugReporter.reportBug(bugInstance);
}
示例3: visitClassContext
import edu.umd.cs.findbugs.FindBugsAnalysisFeatures; //导入依赖的package包/类
public void visitClassContext(ClassContext classContext) {
boolean fullAnalysis = AnalysisContext.currentAnalysisContext().getBoolProperty(
FindBugsAnalysisFeatures.INTERPROCEDURAL_ANALYSIS_OF_REFERENCED_CLASSES);
if (!fullAnalysis && !AnalysisContext.currentAnalysisContext()./*
* getSubtypes
* ().
*/isApplicationClass(classContext.getJavaClass()))
return;
if (VERBOSE_DEBUG)
System.out.println("Visiting class " + classContext.getJavaClass().getClassName());
for (Method m : classContext.getMethodsInCallOrder())
considerMethod(classContext, m);
}
示例4: visitClassContext
import edu.umd.cs.findbugs.FindBugsAnalysisFeatures; //导入依赖的package包/类
public void visitClassContext(ClassContext classContext) {
boolean fullAnalysis = AnalysisContext.currentAnalysisContext().getBoolProperty(
FindBugsAnalysisFeatures.INTERPROCEDURAL_ANALYSIS_OF_REFERENCED_CLASSES);
if (!fullAnalysis && !AnalysisContext.currentAnalysisContext().isApplicationClass(classContext.getJavaClass()))
return;
if (VERBOSE_DEBUG)
System.out.println("Visiting class " + classContext.getJavaClass().getClassName());
for (Method m : classContext.getMethodsInCallOrder())
considerMethod(classContext, m);
}
示例5: decorateWarning
import edu.umd.cs.findbugs.FindBugsAnalysisFeatures; //导入依赖的package包/类
private void decorateWarning(Location location, WarningPropertySet<WarningProperty> propertySet, BugInstance warning) {
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
propertySet.decorateBugInstance(warning);
}