public abstract class JavaRecursiveElementWalkingVisitor extends JavaElementVisitor implements PsiRecursiveVisitor
Note: This visitor handles all containing elements without consuming stack space, so it can be used even for very deep trees.
Note 2: This visitor works for source-based PSI only. Any elements implementing PsiCompiledElement
will be rejected.
EMPTY_VISITOR
Constructor and Description |
---|
JavaRecursiveElementWalkingVisitor() |
Modifier and Type | Method and Description |
---|---|
protected void |
elementFinished(PsiElement element) |
void |
stopWalking() |
void |
visitElement(PsiElement element) |
void |
visitReferenceExpression(PsiReferenceExpression expression)
PsiReferenceExpression is PsiReferenceElement and PsiExpression at the same time.
|
visitAnnotation, visitAnnotationArrayInitializer, visitAnnotationMethod, visitAnnotationParameterList, visitAnonymousClass, visitArrayAccessExpression, visitArrayInitializerExpression, visitAssertStatement, visitAssignmentExpression, visitBinaryExpression, visitBlockStatement, visitBreakStatement, visitCallExpression, visitCatchSection, visitClass, visitClassInitializer, visitClassObjectAccessExpression, visitCodeBlock, visitCodeFragment, visitConditionalExpression, visitContinueStatement, visitDeclarationStatement, visitDocComment, visitDocTag, visitDocTagValue, visitDocToken, visitDoWhileStatement, visitEmptyStatement, visitEnumConstant, visitEnumConstantInitializer, visitExpression, visitExpressionList, visitExpressionListStatement, visitExpressionStatement, visitField, visitForeachStatement, visitForStatement, visitIdentifier, visitIfStatement, visitImplicitVariable, visitImportList, visitImportStatement, visitImportStaticReferenceElement, visitImportStaticStatement, visitInlineDocTag, visitInstanceOfExpression, visitJavaFile, visitJavaToken, visitKeyword, visitLabeledStatement, visitLambdaExpression, visitLiteralExpression, visitLocalVariable, visitMethod, visitMethodCallExpression, visitMethodReferenceExpression, visitModifierList, visitModule, visitModuleReferenceElement, visitModuleStatement, visitNameValuePair, visitNewExpression, visitPackage, visitPackageAccessibilityStatement, visitPackageStatement, visitParameter, visitParameterList, visitParenthesizedExpression, visitPattern, visitPatternVariable, visitPolyadicExpression, visitPostfixExpression, visitPrefixExpression, visitProvidesStatement, visitReceiverParameter, visitRecordComponent, visitRecordHeader, visitReferenceElement, visitReferenceList, visitReferenceParameterList, visitRequiresStatement, visitResourceExpression, visitResourceList, visitResourceVariable, visitReturnStatement, visitStatement, visitSuperExpression, visitSwitchExpression, visitSwitchLabeledRuleStatement, visitSwitchLabelStatement, visitSwitchStatement, visitSynchronizedStatement, visitThisExpression, visitThrowStatement, visitTryStatement, visitTypeCastExpression, visitTypeElement, visitTypeParameter, visitTypeParameterList, visitTypeTestPattern, visitUnaryExpression, visitUsesStatement, visitVariable, visitWhileStatement, visitYieldStatement
visitBinaryFile, visitComment, visitDirectory, visitErrorElement, visitFile, visitOuterLanguageElement, visitPlainText, visitPlainTextFile, visitWhiteSpace
public void visitElement(PsiElement element)
visitElement
in class PsiElementVisitor
protected void elementFinished(PsiElement element)
public void visitReferenceExpression(PsiReferenceExpression expression)
JavaElementVisitor
JavaRecursiveElementVisitor
knows that and implements this method accordingly.
All other visitor must decide themselves what implementation (visitReferenceElement() or visitExpression() or none or LOG.error())
is appropriate for them.visitReferenceExpression
in class JavaElementVisitor
public void stopWalking()