Class ConstructorOfClass
java.lang.Object
com.google.errorprone.matchers.ChildMultiMatcher<com.sun.source.tree.ClassTree,com.sun.source.tree.MethodTree>
com.google.errorprone.matchers.ConstructorOfClass
- All Implemented Interfaces:
Matcher<com.sun.source.tree.ClassTree>
,MultiMatcher<com.sun.source.tree.ClassTree,
,com.sun.source.tree.MethodTree> Serializable
public class ConstructorOfClass
extends ChildMultiMatcher<com.sun.source.tree.ClassTree,com.sun.source.tree.MethodTree>
Applies the given matcher to the constructor(s) of the given class.
- Author:
- eaftan@google.com (Eddie Aftandilian)
- See Also:
-
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
ConstructorDescriptionConstructorOfClass
(ChildMultiMatcher.MatchType matchType, Matcher<com.sun.source.tree.MethodTree> nodeMatcher) -
Method Summary
Modifier and TypeMethodDescriptionprotected Iterable
<? extends com.sun.source.tree.MethodTree> getChildNodes
(com.sun.source.tree.ClassTree classTree, VisitorState state) Returns the set of child nodes to match.Methods inherited from class com.google.errorprone.matchers.ChildMultiMatcher
matches, multiMatchResult
-
Constructor Details
-
ConstructorOfClass
public ConstructorOfClass(ChildMultiMatcher.MatchType matchType, Matcher<com.sun.source.tree.MethodTree> nodeMatcher)
-
-
Method Details
-
getChildNodes
protected Iterable<? extends com.sun.source.tree.MethodTree> getChildNodes(com.sun.source.tree.ClassTree classTree, 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.ClassTree,
com.sun.source.tree.MethodTree>
-