Class AbstractReturnValueIgnored

All Implemented Interfaces:
BugChecker.MemberReferenceTreeMatcher, BugChecker.MethodInvocationTreeMatcher, BugChecker.NewClassTreeMatcher, BugChecker.ReturnTreeMatcher, Suppressible, Serializable
Direct Known Subclasses:
CheckReturnValue, FutureReturnValueIgnored, IgnoredPureGetter, ProtoBuilderReturnValueIgnored, RectIntersectReturnValueIgnored, ReturnValueIgnored, RxReturnValueIgnored

public abstract class AbstractReturnValueIgnored
extends BugChecker
implements BugChecker.MethodInvocationTreeMatcher, BugChecker.MemberReferenceTreeMatcher, BugChecker.ReturnTreeMatcher, BugChecker.NewClassTreeMatcher
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( to define the type information they wish to keep.

Author: (Eddie Aftandilian)
See Also:
Serialized Form
  • Constructor Details

    • AbstractReturnValueIgnored

      protected AbstractReturnValueIgnored()
    • AbstractReturnValueIgnored

      protected AbstractReturnValueIgnored​(ErrorProneFlags flags)
  • Method Details