public final class RefasterJsScanner extends Scanner
| Constructor and Description |
|---|
RefasterJsScanner() |
| Modifier and Type | Method and Description |
|---|---|
void |
loadRefasterJsTemplate(String refasterjsTemplate)
Loads the RefasterJs template.
|
void |
loadRefasterJsTemplateFromCode(String refasterJsTemplate)
Loads the RefasterJs template.
|
boolean |
matches(Node node,
NodeMetadata metadata)
Returns true if the given node and node traversal should match for this
particular scanner.
|
List<SuggestedFix> |
processMatch(Match match)
Processes one
Match at a time. |
processAllMatchespublic void loadRefasterJsTemplate(String refasterjsTemplate) throws IOException
IOExceptionpublic void loadRefasterJsTemplateFromCode(String refasterJsTemplate) throws IOException
IOExceptionpublic boolean matches(Node node, NodeMetadata metadata)
ScannerMatcher 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 Scanner.processMatch(Match) and all matches will be passed to
#processAlMatches(Collection) at the end of the traversal.public List<SuggestedFix> processMatch(Match match)
ScannerMatch at a time. There is no order guaranteed for
when this function will be called with the Match.processMatch in class Scannermatch - The Match from the node and traversal for any match
that Scanner.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.Copyright © 2009-2015 Google. All Rights Reserved.