Class 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:
    [email protected] (Peter Schmitt)
    See Also:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • matches

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