public abstract class Scanner extends Object implements Serializable
Constructor and Description |
---|
Scanner() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
matches(Node node,
NodeMetadata t)
Returns true if the given node and node traversal should match for this
particular scanner.
|
List<SuggestedFix> |
processAllMatches(Collection<Match> matches)
Processes every given match at one time.
|
List<SuggestedFix> |
processMatch(Match match)
Processes one
Match at a time. |
public abstract boolean matches(Node node, NodeMetadata t)
Matcher
class
or predefined matchers from Matchers
to match against the Node and
NodeMetadata.
If this function returns true, a Match
for this node will be passed
to processMatch(Match)
and all matches will be passed to
processAllMatches(Collection)
at the end of the traversal.public List<SuggestedFix> processMatch(Match match)
Match
at a time. There is no order guaranteed for
when this function will be called with the Match.match
- The Match
from the node and traversal for any match
that matches(com.google.javascript.rhino.Node, com.google.javascript.refactoring.NodeMetadata)
returned true for.SuggestedFix
classes that will be applied to the
source files at the end of the run to create the refactoring CL.public List<SuggestedFix> processAllMatches(Collection<Match> matches)
matches
- All the Match
matches that were collected when the
matches(com.google.javascript.rhino.Node, com.google.javascript.refactoring.NodeMetadata)
function returned true.SuggestedFix
classes that will be applied to the
source files at the end of the run to create the refactoring CL.Copyright © 2009-2017 Google. All Rights Reserved.