public class LineBreaksPreparator extends ASTVisitor
| Constructor and Description |
|---|
LineBreaksPreparator(TokenManager tokenManager,
DefaultCodeFormatterOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
finishUp() |
boolean |
preVisit2(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(ArrayInitializer node)
Visits the given type-specific AST node.
|
boolean |
visit(Block node)
Visits the given type-specific AST node.
|
boolean |
visit(CatchClause node)
Visits the given type-specific AST node.
|
boolean |
visit(CompilationUnit node)
Visits the given type-specific AST node.
|
boolean |
visit(DoStatement node)
Visits the given type-specific AST node.
|
boolean |
visit(EnhancedForStatement node)
Visits the given type-specific AST node.
|
boolean |
visit(EnumDeclaration 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(LabeledStatement node)
Visits the given type-specific AST node.
|
boolean |
visit(MarkerAnnotation node)
Visits the given type-specific AST node.
|
boolean |
visit(MethodDeclaration 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(PackageDeclaration 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(SwitchStatement 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(VariableDeclarationExpression 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.
|
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, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, postVisit, preVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitpublic LineBreaksPreparator(TokenManager tokenManager, DefaultCodeFormatterOptions options)
public boolean preVisit2(ASTNode node)
ASTVisitorvisit).
The default implementation calls ASTVisitor.preVisit(ASTNode) and then
returns true. Subclasses may reimplement.
preVisit2 in class ASTVisitornode - the node to visittrue if visit(node) should be called,
and false otherwise.ASTVisitor.preVisit(ASTNode)public boolean visit(CompilationUnit node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(PackageDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(ImportDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(TypeDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(EnumDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(AnnotationTypeDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(AnonymousClassDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(MethodDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(Block node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(SwitchStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(DoStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(LabeledStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(ArrayInitializer node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(NormalAnnotation node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(SingleMemberAnnotation node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(MarkerAnnotation node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(VariableDeclarationStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(SingleVariableDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(VariableDeclarationExpression node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(FieldDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(AnnotationTypeMemberDeclaration node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(Modifier node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(WhileStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(ForStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(EnhancedForStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(IfStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(TryStatement node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic boolean visit(CatchClause node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class ASTVisitornode - the node to visittrue if the children of this node should be
visited, and false if the children of this node should
be skippedpublic void finishUp()