public class CommentsPreparator extends ASTVisitor
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMENT_LINE_SEPARATOR_LENGTH |
| Constructor and Description |
|---|
CommentsPreparator(TokenManager tm,
DefaultCodeFormatterOptions options,
java.lang.String sourceLevel) |
| Modifier and Type | Method and Description |
|---|---|
void |
endVisit(Javadoc node)
End of visit the given type-specific AST node.
|
void |
endVisit(TagElement node)
End of visit the given type-specific AST node.
|
void |
finishUp() |
void |
handleBlockComment(int commentIndex) |
void |
handleLineComment(int commentIndex) |
boolean |
preVisit2(ASTNode node)
Visits the given AST node prior to the type-specific visit (before
visit). |
boolean |
visit(BlockComment node)
Visits the given type-specific AST node.
|
boolean |
visit(Javadoc node)
Visits the given AST node.
|
boolean |
visit(LineComment node)
Visits the given type-specific AST node.
|
boolean |
visit(MemberRef node)
Visits the given type-specific AST node.
|
boolean |
visit(MethodRef node)
Visits the given type-specific AST node.
|
boolean |
visit(QualifiedName node)
Visits the given type-specific AST node.
|
boolean |
visit(TagElement 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, 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, 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 static final int COMMENT_LINE_SEPARATOR_LENGTH
public CommentsPreparator(TokenManager tm, DefaultCodeFormatterOptions options, java.lang.String sourceLevel)
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(LineComment node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
Note: LineComment and BlockComment nodes are
not considered part of main structure of the AST. This method will
only be called if a client goes out of their way to visit this
kind of node explicitly.
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 handleLineComment(int commentIndex)
public boolean visit(BlockComment node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
Note: LineComment and BlockComment nodes are
not considered part of main structure of the AST. This method will
only be called if a client goes out of their way to visit this
kind of node explicitly.
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 handleBlockComment(int commentIndex)
public boolean visit(Javadoc node)
ASTVisitor
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.
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 skippedASTVisitor.ASTVisitor(),
ASTVisitor.ASTVisitor(boolean)public void endVisit(Javadoc node)
ASTVisitorThe default implementation does nothing. Subclasses may reimplement.
endVisit in class ASTVisitornode - the node to visitpublic boolean visit(TagElement 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 endVisit(TagElement node)
ASTVisitorThe default implementation does nothing. Subclasses may reimplement.
endVisit in class ASTVisitornode - the node to visitpublic boolean visit(MethodRef 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(MemberRef 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(QualifiedName 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()