Class ResultUsePolicyEvaluator<C,S,M extends S>
java.lang.Object
com.google.errorprone.bugpatterns.checkreturnvalue.ResultUsePolicyEvaluator<C,S,M>
- Type Parameters:
C
- the type of the context object used during evaluationS
- the type of symbolsM
- the type of method symbols
Evaluates methods and their enclosing classes and packages to determine a
ResultUsePolicy
for the methods.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
ResultUsePolicyEvaluator.Builder<C,
S, M extends S> Builder forResultUsePolicyEvaluator
.static interface
ResultUsePolicyEvaluator.MethodInfo<C,
S, M extends S> Delegate to return information about a method symbol. -
Method Summary
Modifier and TypeMethodDescriptionstatic <C,
S, M extends S>
ResultUsePolicyEvaluator.Builder<C, S, M> builder
(ResultUsePolicyEvaluator.MethodInfo<C, S, M> methodInfo) Returns a newResultUsePolicyEvaluator.Builder
for creating aResultUsePolicyEvaluator
.Evaluates the givenmethod
and returns a singleResultUsePolicy
that should apply to it.evaluations
(M method, C state) Returns a stream ofResultUseRule.Evaluation
s made by rules starting from the givenmethod
.
-
Method Details
-
builder
public static <C,S, ResultUsePolicyEvaluator.Builder<C,M extends S> S, builderM> (ResultUsePolicyEvaluator.MethodInfo<C, S, M> methodInfo) Returns a newResultUsePolicyEvaluator.Builder
for creating aResultUsePolicyEvaluator
.- Type Parameters:
C
- the type of the context object used during evaluationS
- the type of symbolsM
- the type of method symbols
-
evaluate
Evaluates the givenmethod
and returns a singleResultUsePolicy
that should apply to it. -
evaluations
Returns a stream ofResultUseRule.Evaluation
s made by rules starting from the givenmethod
.
-