Class Throws

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

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

    Constructors
    Constructor Description
    Throws​(Matcher<? super com.sun.source.tree.ExpressionTree> thrownMatcher)
    New matcher for a throw statement where the thrown item is matched by the passed thrownMatcher.
  • 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

    • Throws

      public Throws​(Matcher<? super com.sun.source.tree.ExpressionTree> thrownMatcher)
      New matcher for a throw statement where the thrown item is matched by the passed thrownMatcher.
  • 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>