Interface CtComment

    • Field Detail

      • LINE_SEPARATOR

        static final java.lang.String LINE_SEPARATOR
        This line separator is used in comments returned by getContent(). It is OS independent. It has no influence to pretty printed comments, which uses by default OS dependent line separator
        See Also:
        Constant Field Values
    • Method Detail

      • getContent

        java.lang.String getContent()
        Get the content of the comment
        Returns:
        the content of the comment
      • setContent

        <E extends CtComment> E setContent​(java.lang.String content)
      • getRawContent

        java.lang.String getRawContent()
        Returns:
        the original raw comment from the source file including comment prefix and suffix, indentation (including TABs) original EOLs, based on the attached position object (the returned value is "derived" from the position). If the file pointed to in the position object does not exist on disk anymore, then the empty string "" is returned Note: the call of setContent(String) doesn't influence the returned value, only the value of the position object.
      • getCommentType

        CtComment.CommentType getCommentType()
        Get the type of the comment
        Returns:
        the comment type
      • asJavaDoc

        CtJavaDoc asJavaDoc()
        Utility method to for casting the object, throws an exception if not of the correct type