Package org.sonar.java.ast.visitors
Class SubscriptionVisitor
- java.lang.Object
-
- org.sonar.java.ast.visitors.SubscriptionVisitor
-
- All Implemented Interfaces:
JavaCheck,JavaFileScanner
- Direct Known Subclasses:
CommentLinesVisitor,FileLinesVisitor,IssuableSubscriptionVisitor,LinesOfCodeVisitor,Measurer,SymbolicExecutionVisitor,SyntaxHighlighterVisitor
public abstract class SubscriptionVisitor extends Object implements JavaFileScanner
-
-
Field Summary
Fields Modifier and Type Field Description protected JavaFileScannerContextcontext
-
Constructor Summary
Constructors Constructor Description SubscriptionVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanhasSemantic()Deprecated.Since moving to Eclipse frontend doesn't really emulates incomplete semantic.voidleaveFile(JavaFileScannerContext context)voidleaveNode(Tree tree)abstract List<Tree.Kind>nodesToVisit()voidscanFile(JavaFileScannerContext context)Method called after parsing and semantic analysis has been done on file.protected voidscanTree(Tree tree)voidsetContext(JavaFileScannerContext context)voidvisitNode(Tree tree)voidvisitToken(SyntaxToken syntaxToken)voidvisitTrivia(SyntaxTrivia syntaxTrivia)
-
-
-
Field Detail
-
context
protected JavaFileScannerContext context
-
-
Method Detail
-
visitNode
public void visitNode(Tree tree)
-
leaveNode
public void leaveNode(Tree tree)
-
visitToken
public void visitToken(SyntaxToken syntaxToken)
-
visitTrivia
public void visitTrivia(SyntaxTrivia syntaxTrivia)
-
setContext
public void setContext(JavaFileScannerContext context)
-
leaveFile
public void leaveFile(JavaFileScannerContext context)
-
scanFile
public void scanFile(JavaFileScannerContext context)
Description copied from interface:JavaFileScannerMethod called after parsing and semantic analysis has been done on file.- Specified by:
scanFilein interfaceJavaFileScanner- Parameters:
context- Context of analysis containing the parsed tree.
-
scanTree
protected void scanTree(Tree tree)
-
hasSemantic
@Deprecated public boolean hasSemantic()
Deprecated.Since moving to Eclipse frontend doesn't really emulates incomplete semantic. Usages of this method should be removed and tests with .noSemantic() should be added to clarify that rules are not behaving unexpectedly in case of incomplete semantic.Checks if semantic model is present.
-
-