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

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

      • matches

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