Package org.sonar.javascript.visitors
Class JavaScriptVisitorContext
- java.lang.Object
-
- org.sonar.javascript.visitors.JavaScriptVisitorContext
-
- All Implemented Interfaces:
TreeVisitorContext
public class JavaScriptVisitorContext extends Object implements TreeVisitorContext
-
-
Constructor Summary
Constructors Constructor Description JavaScriptVisitorContext(ScriptTree tree, org.sonar.api.batch.fs.InputFile inputFile, org.sonar.api.config.Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaScriptFilegetJavaScriptFile()SymbolModelgetSymbolModel()ScriptTreegetTopTree()
-
-
-
Constructor Detail
-
JavaScriptVisitorContext
public JavaScriptVisitorContext(ScriptTree tree, org.sonar.api.batch.fs.InputFile inputFile, org.sonar.api.config.Configuration configuration)
-
-
Method Detail
-
getTopTree
public ScriptTree getTopTree()
- Specified by:
getTopTreein interfaceTreeVisitorContext- Returns:
- the top tree node of the current file AST representation.
-
getJavaScriptFile
public JavaScriptFile getJavaScriptFile()
- Specified by:
getJavaScriptFilein interfaceTreeVisitorContext- Returns:
- the current file
-
getSymbolModel
public SymbolModel getSymbolModel()
- Specified by:
getSymbolModelin interfaceTreeVisitorContext- Returns:
- the symbol model that allows to access the symbols declared in the current file
-
-