Class OneLineEnforcer

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

public class OneLineEnforcer extends ASTVisitor
Implementation of the "Keep braced code on one line" feature.
  • 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:
      ASTVisitor.preVisit(ASTNode)
    • endVisit

      public void endVisit(TypeDeclaration 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
    • endVisit

      public void endVisit(EnumDeclaration 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
    • endVisit

      public void endVisit(AnnotationTypeDeclaration 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
    • endVisit

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

      The default implementation does nothing. Subclasses may re implement.

      Overrides:
      endVisit in class ASTVisitor
      Parameters:
      node - the node to visit
    • endVisit

      public void endVisit(AnonymousClassDeclaration 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
    • endVisit

      public void endVisit(Block 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
    • endVisit

      public void endVisit(ModuleDeclaration 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