public class UastHintsWorker extends AbstractPatternWorker
Modifier and Type | Class and Description |
---|---|
class |
UastHintsWorker.HintsReader
Provides a service for reading generic named hints associated with the
current AST.
|
Modifier and Type | Field and Description |
---|---|
private UastHints |
hints
Stores the current AST's hints object.
|
Constructor and Description |
---|
UastHintsWorker()
Default constructor which calls the super-class constructor, registers its libraries and initializes its
instance members.
|
Modifier and Type | Method and Description |
---|---|
void |
visitAst(Aast ast)
Resets the current hints instance to
null each time a new
AST is visited. |
finish, getCopy, getLibrary, getResolver, getSource, initialize, isConditionalRuleSets, isFlagActivated, isRuntimeQueryMode, registerTree, resolveConstant, setLibrary
private UastHints hints
public UastHintsWorker() throws ConfigurationException, AstException
ConfigurationException
- If a configuration access error is encountered.AstException
- If an error occurs while doing AST operations.public void visitAst(Aast ast)
null
each time a new
AST is visited. This enables the lazy loading of hints files only when
needed.visitAst
in interface PatternWorker
visitAst
in class AbstractPatternWorker
ast
- The root node of the source AST about to be processed by the
pattern engine.