public final class TemplateAstMatcher extends Object
Constructor and Description |
---|
TemplateAstMatcher(AbstractCompiler compiler,
Node templateFunctionNode,
TypeMatchingStrategy typeMatchingStrategy)
Constructs this matcher with a Function node that serves as the template
to match all other nodes against.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Node> |
getTemplateNodeToMatchMap()
Returns a map from named template Nodes (such as parameters
or local variables) to Nodes that were matches from the last matched
template.
|
boolean |
isLooseMatch() |
boolean |
matches(Node n) |
public TemplateAstMatcher(AbstractCompiler compiler, Node templateFunctionNode, TypeMatchingStrategy typeMatchingStrategy)
public boolean matches(Node n)
n
- The node to check.public boolean isLooseMatch()
Copyright © 2009-2016 Google. All Rights Reserved.