Class ResultUseRule.MethodRule<C,S,M extends S>
java.lang.Object
com.google.errorprone.bugpatterns.checkreturnvalue.ResultUseRule<C,S>
com.google.errorprone.bugpatterns.checkreturnvalue.ResultUseRule.MethodRule<C,S,M>
- Type Parameters:
C
- the type of the context object used during evaluationS
- the type of symbolsM
- the type of method symbols
- Direct Known Subclasses:
ExternalCanIgnoreReturnValue
- Enclosing class:
ResultUseRule<C,
S>
A rule that evaluates methods and constructors to determine a
ResultUsePolicy
for them.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.errorprone.bugpatterns.checkreturnvalue.ResultUseRule
ResultUseRule.Evaluation<S>, ResultUseRule.GlobalRule<C,
S>, ResultUseRule.MethodRule<C, S, M extends S>, ResultUseRule.RuleScope, ResultUseRule.SymbolRule<C, S> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Optional
<ResultUsePolicy> Evaluates the givensymbol
and optionally returns aResultUsePolicy
for it.abstract Optional
<ResultUsePolicy> evaluateMethod
(M method, C context) Evaluates the givenmethod
and optionally returns aResultUsePolicy
for it.final com.google.common.collect.ImmutableSet
<ResultUseRule.RuleScope> scopes()
The scopes this rule applies to.Methods inherited from class com.google.errorprone.bugpatterns.checkreturnvalue.ResultUseRule
evaluate, id, toString
-
Constructor Details
-
MethodRule
-
-
Method Details
-
scopes
Description copied from class:ResultUseRule
The scopes this rule applies to.- Specified by:
scopes
in classResultUseRule<C,
S>
-
evaluateMethod
Evaluates the givenmethod
and optionally returns aResultUsePolicy
for it. -
evaluate
Description copied from class:ResultUseRule
Evaluates the givensymbol
and optionally returns aResultUsePolicy
for it.- Specified by:
evaluate
in classResultUseRule<C,
S>
-