⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nonnullreturnvalueannotationchecker.java

📁 A static analysis tool to find bugs in Java programs
💻 JAVA
字号:
package edu.umd.cs.findbugs.ba.npe;import edu.umd.cs.findbugs.SystemProperties;import edu.umd.cs.findbugs.ba.JavaClassAndMethod;import edu.umd.cs.findbugs.ba.JavaClassAndMethodChooser;import edu.umd.cs.findbugs.ba.XMethod;/** * This callback can be passed to Hierarchy.findInvocationLeastUpperBound * to find the @NonNull or @CheckForNull method return value annotation * which should be applied at a call site. *  * @author David Hovemeyer * @deprecated */public class NonNullReturnValueAnnotationChecker implements JavaClassAndMethodChooser {	private static final boolean DEBUG = SystemProperties.getBoolean("fnd.debug.nullreturn");	private MayReturnNullPropertyDatabase database;	private JavaClassAndMethod annotatedMethod;	private Boolean property;	/** @deprecated */	public NonNullReturnValueAnnotationChecker(MayReturnNullPropertyDatabase database) {		this.database = database;	}	public Boolean getProperty() {		return property;	}	public JavaClassAndMethod getAnnotatedMethod() {		return annotatedMethod;	}	public boolean choose(JavaClassAndMethod javaClassAndMethod) {		XMethod xmethod = javaClassAndMethod.toXMethod();		if (DEBUG) {			System.out.print("Checking " + xmethod + " for @NonNull or @CheckForNull...");		}		Boolean prop = database.getProperty(xmethod);		if (prop != null) {			this.property = prop;			this.annotatedMethod = javaClassAndMethod;			if (DEBUG) {				System.out.println(prop.booleanValue() ? "@CheckForNull" : "@NonNull");			}			return true;		}		if (DEBUG) {			System.out.println("not found");		}		return false;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -