Package com.google.errorprone.matchers
Class MethodHasParameters
- java.lang.Object
-
- com.google.errorprone.matchers.ChildMultiMatcher<com.sun.source.tree.MethodTree,com.sun.source.tree.VariableTree>
-
- com.google.errorprone.matchers.MethodHasParameters
-
- All Implemented Interfaces:
Matcher<com.sun.source.tree.MethodTree>
,MultiMatcher<com.sun.source.tree.MethodTree,com.sun.source.tree.VariableTree>
,Serializable
public class MethodHasParameters extends ChildMultiMatcher<com.sun.source.tree.MethodTree,com.sun.source.tree.VariableTree>
Matches if the given matcher matches all of/any of the parameters to this method.- Author:
- [email protected] (Eddie Aftandilian)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.errorprone.matchers.ChildMultiMatcher
ChildMultiMatcher.MatchType
-
Nested classes/interfaces inherited from interface com.google.errorprone.matchers.MultiMatcher
MultiMatcher.MultiMatchResult<N extends com.sun.source.tree.Tree>
-
-
Field Summary
-
Fields inherited from class com.google.errorprone.matchers.ChildMultiMatcher
nodeMatcher
-
-
Constructor Summary
Constructors Constructor Description MethodHasParameters(ChildMultiMatcher.MatchType matchType, Matcher<com.sun.source.tree.VariableTree> nodeMatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterable<? extends com.sun.source.tree.VariableTree>
getChildNodes(com.sun.source.tree.MethodTree methodTree, VisitorState state)
Returns the set of child nodes to match.-
Methods inherited from class com.google.errorprone.matchers.ChildMultiMatcher
matches, multiMatchResult
-
-
-
-
Constructor Detail
-
MethodHasParameters
public MethodHasParameters(ChildMultiMatcher.MatchType matchType, Matcher<com.sun.source.tree.VariableTree> nodeMatcher)
-
-
Method Detail
-
getChildNodes
protected Iterable<? extends com.sun.source.tree.VariableTree> getChildNodes(com.sun.source.tree.MethodTree methodTree, VisitorState state)
Description copied from class:ChildMultiMatcher
Returns the set of child nodes to match. The nodes must be immediate children of the current node to ensure the TreePath calculation is correct. MultiMatchers with other requirements should not subclass ChildMultiMatcher.- Specified by:
getChildNodes
in classChildMultiMatcher<com.sun.source.tree.MethodTree,com.sun.source.tree.VariableTree>
-
-