Search in sources :

Example 1 with BlockComment

use of com.github.antlrjavaparser.api.BlockComment in project spring-roo by spring-projects.

the class JavaParserCommentMetadataBuilder method adaptComment.

/**
 * Adapt the roo interface to the antlr-java-parser interface
 *
 * @param rooComment
 * @return
 */
private static Comment adaptComment(final org.springframework.roo.classpath.details.comments.AbstractComment rooComment) {
    Comment comment;
    if (rooComment instanceof org.springframework.roo.classpath.details.comments.LineComment) {
        comment = new LineComment();
    } else if (rooComment instanceof org.springframework.roo.classpath.details.comments.JavadocComment) {
        comment = new JavadocComment();
    } else {
        comment = new BlockComment();
    }
    comment.setContent(rooComment.getComment());
    return comment;
}
Also used : LineComment(com.github.antlrjavaparser.api.LineComment) JavadocComment(com.github.antlrjavaparser.api.body.JavadocComment) Comment(com.github.antlrjavaparser.api.Comment) BlockComment(com.github.antlrjavaparser.api.BlockComment) BlockComment(com.github.antlrjavaparser.api.BlockComment) JavadocComment(com.github.antlrjavaparser.api.body.JavadocComment) LineComment(com.github.antlrjavaparser.api.LineComment)

Aggregations

BlockComment (com.github.antlrjavaparser.api.BlockComment)1 Comment (com.github.antlrjavaparser.api.Comment)1 LineComment (com.github.antlrjavaparser.api.LineComment)1 JavadocComment (com.github.antlrjavaparser.api.body.JavadocComment)1