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 classResultUsePolicyEvaluator.Builder<C, S, M extends S>Builder forResultUsePolicyEvaluator.static interfaceResultUsePolicyEvaluator.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.Builderfor creating aResultUsePolicyEvaluator.Evaluates the givenmethodand returns a singleResultUsePolicythat should apply to it.evaluations(M method, C state) Returns a stream ofResultUseRule.Evaluations made by rules starting from the givenmethod.
-
Method Details
-
builder
public static <C, S, M extends S> ResultUsePolicyEvaluator.Builder<C,S, builderM> (ResultUsePolicyEvaluator.MethodInfo<C, S, M> methodInfo) Returns a newResultUsePolicyEvaluator.Builderfor 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 givenmethodand returns a singleResultUsePolicythat should apply to it. -
evaluations
Returns a stream ofResultUseRule.Evaluations made by rules starting from the givenmethod.
-