Class Rules
java.lang.Object
com.google.errorprone.bugpatterns.checkreturnvalue.Rules
Factories for common kinds of
ResultUseRule
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultUseRule
<VisitorState, com.sun.tools.javac.code.Symbol> globalDefault
(Optional<ResultUsePolicy> methodDefault, Optional<ResultUsePolicy> constructorDefault) Returns a simple global rule that always returns the given defaults for methods and constructors.static ResultUseRule
<VisitorState, com.sun.tools.javac.code.Symbol> mapAnnotationSimpleName
(String simpleName, ResultUsePolicy policy)
-
Method Details
-
globalDefault
public static ResultUseRule<VisitorState,com.sun.tools.javac.code.Symbol> globalDefault(Optional<ResultUsePolicy> methodDefault, Optional<ResultUsePolicy> constructorDefault) Returns a simple global rule that always returns the given defaults for methods and constructors. -
mapAnnotationSimpleName
public static ResultUseRule<VisitorState,com.sun.tools.javac.code.Symbol> mapAnnotationSimpleName(String simpleName, ResultUsePolicy policy)
-