Class MethodInvocation

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

public class MethodInvocation
extends Object
implements Matcher<com.sun.source.tree.ExpressionTree>
Matches a method invocation based on a matcher for the method select (receiver + method identifier) and one for the arguments.
Author:
schmitt@google.com (Peter Schmitt)
See Also:
Serialized Form
  • Constructor Details

    • MethodInvocation

      public MethodInvocation​(Matcher<com.sun.source.tree.ExpressionTree> methodSelectMatcher, ChildMultiMatcher.MatchType matchType, Matcher<com.sun.source.tree.ExpressionTree> methodArgumentMatcher)
      Creates a new matcher for method invocations based on a method select and an argument matcher.
      Parameters:
      matchType - how to apply the argument matcher to the method's arguments
  • Method Details

    • matches

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