Class Returns

java.lang.Object
com.google.errorprone.matchers.Returns
All Implemented Interfaces:
Matcher<com.sun.source.tree.StatementTree>, Serializable

public class Returns extends Object implements Matcher<com.sun.source.tree.StatementTree>
Matches a return statement whose returned expression is matched by the given matcher.
Author:
schmitt@google.com (Peter Schmitt)
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Returns(Matcher<? super com.sun.source.tree.ExpressionTree> returnedMatcher)
    New matcher for a return statement where the returned expression is matched by the passed returnedMatcher.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(com.sun.source.tree.StatementTree expressionTree, VisitorState state)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Returns

      public Returns(Matcher<? super com.sun.source.tree.ExpressionTree> returnedMatcher)
      New matcher for a return statement where the returned expression is matched by the passed returnedMatcher.
  • Method Details

    • matches

      public boolean matches(com.sun.source.tree.StatementTree expressionTree, VisitorState state)
      Specified by:
      matches in interface Matcher<com.sun.source.tree.StatementTree>