groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "杨波" <bo.y...@telecwin.com>
Subject How to extract comments (especially the fields comments) from groovy or java (compiled in groovy) code?
Date Thu, 23 Jul 2020 03:29:27 GMT
Hello,

    I am writing a grails swagger plugin that needs to extract comments of class fields, such
as below code:

class UserCommand {
    /**
     * The name of user in comments
     */
    String username

    String password

    String avatarUrl
}

    Then I need to extract the comment content "The name of user in comments" from the code.
I searched the Groovy2.5 AST, but can not find comments related nodes in the node tree.

How can I do this in Groovy 2.5 ? Because grails needs groovy v2.5.

Thanks!



Best Regards,

Bob Yang


Mime
View raw message