本文整理匯總了Java中edu.umd.cs.findbugs.props.WarningPropertyUtil類的典型用法代碼示例。如果您正苦於以下問題:Java WarningPropertyUtil類的具體用法?Java WarningPropertyUtil怎麽用?Java WarningPropertyUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WarningPropertyUtil類屬於edu.umd.cs.findbugs.props包,在下文中一共展示了WarningPropertyUtil類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: reportNullDeref
import edu.umd.cs.findbugs.props.WarningPropertyUtil; //導入依賴的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.props.WarningPropertyUtil; //導入依賴的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: decorateWarning
import edu.umd.cs.findbugs.props.WarningPropertyUtil; //導入依賴的package包/類
private void decorateWarning(Location location, WarningPropertySet<WarningProperty> propertySet, BugInstance warning) {
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
propertySet.decorateBugInstance(warning);
}