Class AbstractReturnValueIgnored

java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.AbstractReturnValueIgnored
All Implemented Interfaces:
BugChecker.MemberReferenceTreeMatcher, BugChecker.MethodInvocationTreeMatcher, BugChecker.NewClassTreeMatcher, BugChecker.ReturnTreeMatcher, ResultUsePolicyAnalyzer<ExpressionTree, VisitorState>, Suppressible, Serializable
Direct Known Subclasses:
CheckReturnValue, FutureReturnValueIgnored, IgnoredPureGetter, ProtoBuilderReturnValueIgnored, RectIntersectReturnValueIgnored, ReturnValueIgnored, RxReturnValueIgnored

An abstract base class to match API usages in which the return value is not used.

In addition to regular contexts in which a return value isn't used (e.g.: the result of String.trim() is just ignored), this class has the capacity to determine if the result is cast in such a way as to lose important static type information.

If an analysis extending this base class chooses to care about this circumstance, they can override lostType(VisitorState) to define the type information they wish to keep.

Author:
eaftan@google.com (Eddie Aftandilian)
See Also: