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 JavaFileScannerContext
context
-
Constructor Summary
Constructors Constructor Description SubscriptionVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
hasSemantic()
Deprecated.Since moving to Eclipse frontend doesn't really emulates incomplete semantic.void
leaveFile(JavaFileScannerContext context)
void
leaveNode(Tree tree)
abstract List<Tree.Kind>
nodesToVisit()
void
scanFile(JavaFileScannerContext context)
Method called after parsing and semantic analysis has been done on file.protected void
scanTree(Tree tree)
void
setContext(JavaFileScannerContext context)
void
visitNode(Tree tree)
void
visitToken(SyntaxToken syntaxToken)
void
visitTrivia(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:JavaFileScanner
Method called after parsing and semantic analysis has been done on file.- Specified by:
scanFile
in 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.
-
-