public class AstTreeVisitorContextImpl extends Object implements AstTreeVisitorContext
| Constructor and Description |
|---|
AstTreeVisitorContextImpl(ScriptTree tree,
org.sonar.squidbridge.api.SourceFile sourceFile,
File file,
SymbolModel symbolModel,
org.sonar.api.config.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIssue(JavaScriptCheck check,
int line,
String message)
Creates an issue.
|
void |
addIssue(JavaScriptCheck check,
int line,
String message,
double cost)
Creates an issue.
|
void |
addIssue(JavaScriptCheck check,
Tree tree,
String message)
Creates an issue.
|
void |
addIssue(JavaScriptCheck check,
Tree tree,
String message,
double cost)
Creates an issue.
|
File |
getFile() |
String |
getFileKey() |
String[] |
getPropertyValues(String name)
Fetch project property
|
SymbolModel |
getSymbolModel() |
ScriptTree |
getTopTree() |
public AstTreeVisitorContextImpl(ScriptTree tree, org.sonar.squidbridge.api.SourceFile sourceFile, File file, SymbolModel symbolModel, org.sonar.api.config.Settings settings)
public ScriptTree getTopTree()
getTopTree in interface AstTreeVisitorContextpublic void addIssue(JavaScriptCheck check, Tree tree, String message)
AstTreeVisitorContextaddIssue in interface AstTreeVisitorContextcheck - instance of the check that creates the issue.tree - the tree on which the issue should be raise. Means the issue will be raised on its corresponding line in the source code.message - the issue message.public void addIssue(JavaScriptCheck check, int line, String message)
AstTreeVisitorContextaddIssue in interface AstTreeVisitorContextcheck - instance of the check that create the issueline - source line on which the issue should be raisedmessage - the issue messagepublic void addIssue(JavaScriptCheck check, Tree tree, String message, double cost)
AstTreeVisitorContextaddIssue in interface AstTreeVisitorContextcheck - instance of the check that create the issuetree - the tree on which the issue should be raise. Means the issue will be raised on its corresponding line in the source code.message - the issue messagecost - specific remediation cost for the issue, used to compute the technical debtpublic void addIssue(JavaScriptCheck check, int line, String message, double cost)
AstTreeVisitorContextaddIssue in interface AstTreeVisitorContextcheck - instance of the check that create the issueline - source line on which the issue should be raisedmessage - the issue messagecost - specific remediation cost for the issue, used to compute the technical debtpublic String getFileKey()
getFileKey in interface AstTreeVisitorContextpublic File getFile()
getFile in interface AstTreeVisitorContextpublic SymbolModel getSymbolModel()
getSymbolModel in interface AstTreeVisitorContextpublic String[] getPropertyValues(String name)
AstTreeVisitorContextgetPropertyValues in interface AstTreeVisitorContextname - property keyCopyright © 2011–2015 SonarSource and Eriks Nukis. All rights reserved.