org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite
Class ASTRewriteAnalyzer

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.core.dom.ASTVisitor
      extended by org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer

public final class ASTRewriteAnalyzer
extends ASTVisitor

Infrastructure to support code modifications. Existing code must stay untouched, new code added with correct formatting, moved code left with the user's formatting / comments. Idea: - Get the AST for existing code - Describe changes - This visitor analyzes the changes or annotations and generates text edits (text manipulation API) that describe the required code changes.


Nested Class Summary
static interface ASTRewriteAnalyzer.IASTRewriteAnalyzerFactory
           
 
Constructor Summary
ASTRewriteAnalyzer(char[] content, LineInformation lineInfo, java.lang.String lineDelim, TextEdit rootEdit, RewriteEventStore eventStore, NodeInfoStore nodeInfos, java.util.List comments, java.util.Map options, TargetSourceRangeComputer extendedSourceRangeComputer, RecoveryScannerData recoveryScannerData)
          Constructor for ASTRewriteAnalyzer.
 
Method Summary
 void ensureSpaceAfterReplace(ASTNode node, ChildPropertyDescriptor desc)
           
 void ensureSpaceBeforeReplace(ASTNode node)
           
static ASTVisitor getAnalyzerVisitor(char[] content2, LineInformation lineInfo2, java.lang.String lineDelim, TextEdit result, RewriteEventStore eventStore2, NodeInfoStore nodeStore, java.util.List comments, java.util.Map options, TargetSourceRangeComputer xsrComputer, RecoveryScannerData recoveryScannerData)
           
 void postVisit(ASTNode node)
          Visits the given AST node following the type-specific visit (after endVisit).
 void preVisit(ASTNode node)
          Visits the given AST node prior to the type-specific visit (before visit).
 boolean visit(AnnotationTypeDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(AnnotationTypeMemberDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(AnonymousClassDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(ArrayAccess node)
          Visits the given type-specific AST node.
 boolean visit(ArrayCreation node)
          Visits the given type-specific AST node.
 boolean visit(ArrayInitializer node)
          Visits the given type-specific AST node.
 boolean visit(ArrayType node)
          Visits the given type-specific AST node.
 boolean visit(AssertStatement node)
          Visits the given type-specific AST node.
 boolean visit(Assignment node)
          Visits the given type-specific AST node.
 boolean visit(Block node)
          Visits the given type-specific AST node.
 boolean visit(BooleanLiteral node)
          Visits the given type-specific AST node.
 boolean visit(BreakStatement node)
          Visits the given type-specific AST node.
 boolean visit(CastExpression node)
          Visits the given type-specific AST node.
 boolean visit(CatchClause node)
          Visits the given type-specific AST node.
 boolean visit(CharacterLiteral node)
          Visits the given type-specific AST node.
 boolean visit(ClassInstanceCreation node)
          Visits the given type-specific AST node.
 boolean visit(CompilationUnit node)
          Visits the given type-specific AST node.
 boolean visit(ConditionalExpression node)
          Visits the given type-specific AST node.
 boolean visit(ConstructorInvocation node)
          Visits the given type-specific AST node.
 boolean visit(ContinueStatement node)
          Visits the given type-specific AST node.
 boolean visit(DoStatement node)
          Visits the given type-specific AST node.
 boolean visit(EmptyStatement node)
          Visits the given type-specific AST node.
 boolean visit(EnhancedForStatement node)
          Visits the given type-specific AST node.
 boolean visit(EnumConstantDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(EnumDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(ExpressionStatement node)
          Visits the given type-specific AST node.
 boolean visit(FieldAccess node)
          Visits the given type-specific AST node.
 boolean visit(FieldDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(ForStatement node)
          Visits the given type-specific AST node.
 boolean visit(IfStatement node)
          Visits the given type-specific AST node.
 boolean visit(ImportDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(InfixExpression node)
          Visits the given type-specific AST node.
 boolean visit(Initializer node)
          Visits the given type-specific AST node.
 boolean visit(InstanceofExpression node)
          Visits the given type-specific AST node.
 boolean visit(Javadoc node)
          Visits the given AST node.
 boolean visit(LabeledStatement node)
          Visits the given type-specific AST node.
 boolean visit(MarkerAnnotation node)
          Visits the given type-specific AST node.
 boolean visit(MemberRef node)
          Visits the given type-specific AST node.
 boolean visit(MemberValuePair node)
          Visits the given type-specific AST node.
 boolean visit(MethodDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(MethodInvocation node)
          Visits the given type-specific AST node.
 boolean visit(MethodRef node)
          Visits the given type-specific AST node.
 boolean visit(MethodRefParameter node)
          Visits the given type-specific AST node.
 boolean visit(Modifier node)
          Visits the given type-specific AST node.
 boolean visit(NormalAnnotation node)
          Visits the given type-specific AST node.
 boolean visit(NullLiteral node)
          Visits the given type-specific AST node.
 boolean visit(NumberLiteral node)
          Visits the given type-specific AST node.
 boolean visit(PackageDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(ParameterizedType node)
          Visits the given type-specific AST node.
 boolean visit(ParenthesizedExpression node)
          Visits the given type-specific AST node.
 boolean visit(PostfixExpression node)
          Visits the given type-specific AST node.
 boolean visit(PrefixExpression node)
          Visits the given type-specific AST node.
 boolean visit(PrimitiveType node)
          Visits the given type-specific AST node.
 boolean visit(QualifiedName node)
          Visits the given type-specific AST node.
 boolean visit(QualifiedType node)
          Visits the given type-specific AST node.
 boolean visit(ReturnStatement node)
          Visits the given type-specific AST node.
 boolean visit(SimpleName node)
          Visits the given type-specific AST node.
 boolean visit(SimpleType node)
          Visits the given type-specific AST node.
 boolean visit(SingleMemberAnnotation node)
          Visits the given type-specific AST node.
 boolean visit(SingleVariableDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(StringLiteral node)
          Visits the given type-specific AST node.
 boolean visit(SuperConstructorInvocation node)
          Visits the given type-specific AST node.
 boolean visit(SuperFieldAccess node)
          Visits the given type-specific AST node.
 boolean visit(SuperMethodInvocation node)
          Visits the given type-specific AST node.
 boolean visit(SwitchCase node)
          Visits the given type-specific AST node.
 boolean visit(SwitchStatement node)
          Visits the given type-specific AST node.
 boolean visit(SynchronizedStatement node)
          Visits the given type-specific AST node.
 boolean visit(TagElement node)
          Visits the given type-specific AST node.
 boolean visit(TextElement node)
          Visits the given type-specific AST node.
 boolean visit(ThisExpression node)
          Visits the given type-specific AST node.
 boolean visit(ThrowStatement node)
          Visits the given type-specific AST node.
 boolean visit(TryStatement node)
          Visits the given type-specific AST node.
 boolean visit(TypeDeclaration node)
          Visits the given type-specific AST node.
 boolean visit(TypeDeclarationStatement node)
          Visits the given type-specific AST node.
 boolean visit(TypeLiteral node)
          Visits the given type-specific AST node.
 boolean visit(TypeParameter node)
          Visits the given type-specific AST node.
 boolean visit(UnionType node)
          Visits the given type-specific AST node.
 boolean visit(VariableDeclarationExpression node)
          Visits the given type-specific AST node.
 boolean visit(VariableDeclarationFragment node)
          Visits the given type-specific AST node.
 boolean visit(VariableDeclarationStatement node)
          Visits the given type-specific AST node.
 boolean visit(WhileStatement node)
          Visits the given type-specific AST node.
 boolean visit(WildcardType node)
          Visits the given type-specific AST node.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.core.dom.ASTVisitor
endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, preVisit2, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTRewriteAnalyzer

public ASTRewriteAnalyzer(char[] content,
                          LineInformation lineInfo,
                          java.lang.String lineDelim,
                          TextEdit rootEdit,
                          RewriteEventStore eventStore,
                          NodeInfoStore nodeInfos,
                          java.util.List comments,
                          java.util.Map options,
                          TargetSourceRangeComputer extendedSourceRangeComputer,
                          RecoveryScannerData recoveryScannerData)
Constructor for ASTRewriteAnalyzer.

The given options cannot be null.

Parameters:
content - the content of the compilation unit to rewrite.
lineInfo - line information for the content of the compilation unit to rewrite.
rootEdit - the edit to add all generated edits to
eventStore - the event store containing the description of changes
nodeInfos - annotations to nodes, such as if a node is a string placeholder or a copy target
comments - list of comments of the compilation unit to rewrite (elements of type Comment) or null.
options - the current jdt.core options (formatting/compliance)
extendedSourceRangeComputer - the source range computer to use
recoveryScannerData - internal data used by RecoveryScanner
Method Detail

getAnalyzerVisitor

public static ASTVisitor getAnalyzerVisitor(char[] content2,
                                            LineInformation lineInfo2,
                                            java.lang.String lineDelim,
                                            TextEdit result,
                                            RewriteEventStore eventStore2,
                                            NodeInfoStore nodeStore,
                                            java.util.List comments,
                                            java.util.Map options,
                                            TargetSourceRangeComputer xsrComputer,
                                            RecoveryScannerData recoveryScannerData)

postVisit

public void postVisit(ASTNode node)
Description copied from class: ASTVisitor
Visits the given AST node following the type-specific visit (after endVisit).

The default implementation does nothing. Subclasses may reimplement.

Overrides:
postVisit in class ASTVisitor
Parameters:
node - the node to visit

preVisit

public void preVisit(ASTNode node)
Description copied from class: ASTVisitor
Visits the given AST node prior to the type-specific visit (before visit).

The default implementation does nothing. Subclasses may reimplement.

Overrides:
preVisit in class ASTVisitor
Parameters:
node - the node to visit
See Also:
ASTVisitor.preVisit2(ASTNode)

visit

public boolean visit(CompilationUnit node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TypeDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MethodDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(Block node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ReturnStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(AnonymousClassDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ArrayAccess node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ArrayCreation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ArrayInitializer node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ArrayType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(AssertStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(Assignment node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(BooleanLiteral node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(BreakStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(CastExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(CatchClause node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(CharacterLiteral node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ClassInstanceCreation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ConditionalExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ConstructorInvocation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ContinueStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(DoStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(EmptyStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ExpressionStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(FieldAccess node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(FieldDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ForStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(IfStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ImportDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(InfixExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(Initializer node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(InstanceofExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

ensureSpaceAfterReplace

public void ensureSpaceAfterReplace(ASTNode node,
                                    ChildPropertyDescriptor desc)

ensureSpaceBeforeReplace

public void ensureSpaceBeforeReplace(ASTNode node)

visit

public boolean visit(Javadoc node)
Description copied from class: ASTVisitor
Visits the given AST node.

Unlike other node types, the boolean returned by the default implementation is controlled by a constructor-supplied parameter ASTVisitor(boolean) which is false by default. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped
See Also:
ASTVisitor.ASTVisitor(), ASTVisitor.ASTVisitor(boolean)

visit

public boolean visit(LabeledStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MethodInvocation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(NullLiteral node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(NumberLiteral node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(PackageDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ParenthesizedExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(PostfixExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(PrefixExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(PrimitiveType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(QualifiedName node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SimpleName node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SimpleType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SingleVariableDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(StringLiteral node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SuperConstructorInvocation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SuperFieldAccess node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SuperMethodInvocation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SwitchCase node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SwitchStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SynchronizedStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ThisExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ThrowStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TryStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TypeDeclarationStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TypeLiteral node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(UnionType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(VariableDeclarationExpression node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(VariableDeclarationFragment node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(VariableDeclarationStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(WhileStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MemberRef node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MethodRef node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MethodRefParameter node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TagElement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TextElement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(AnnotationTypeDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(AnnotationTypeMemberDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(EnhancedForStatement node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(EnumConstantDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(EnumDeclaration node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MarkerAnnotation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(MemberValuePair node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(Modifier node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(NormalAnnotation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(ParameterizedType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(QualifiedType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(SingleMemberAnnotation node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(TypeParameter node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped

visit

public boolean visit(WildcardType node)
Description copied from class: ASTVisitor
Visits the given type-specific AST node.

The default implementation does nothing and return true. Subclasses may reimplement.

Overrides:
visit in class ASTVisitor
Parameters:
node - the node to visit
Returns:
true if the children of this node should be visited, and false if the children of this node should be skipped