java.lang.Object
org.aspectj.org.eclipse.jdt.core.dom.ASTVisitor
org.aspectj.org.eclipse.jdt.internal.formatter.linewrap.WrapPreparator

public class WrapPreparator extends ASTVisitor
  • Constructor Details

  • Method Details

    • preVisit2

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

      The default implementation calls ASTVisitor.preVisit(ASTNode) and then returns true. Subclasses may reimplement.

      Overrides:
      preVisit2 in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if visit(node) should be called, and false otherwise.
      See Also:
    • 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
    • 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(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(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(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(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(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(RecordDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may re-implement.

      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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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
    • endVisit

      public void endVisit(DoStatement node)
      Description copied from class: ASTVisitor
      End of visit the given type-specific AST node.

      The default implementation does nothing. Subclasses may reimplement.

      Overrides:
      endVisit in class ASTVisitor
      Parameters:
      node - the node to visit
    • 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(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(LambdaExpression 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(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(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(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(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(TypeMethodReference 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(ExpressionMethodReference node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may re-implement.

      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(SuperMethodReference 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(CreationReference node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may re-implement.

      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(ExportsDirective node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may re-implement.

      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(OpensDirective node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may re-implement.

      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(ProvidesDirective node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may re-implement.

      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(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(SwitchExpression 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(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(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
    • finishUp

      public void finishUp(ASTNode astRoot, List<org.eclipse.jface.text.IRegion> regions)