Class CtCommentImpl

    • Field Detail

      • content

        protected java.lang.String content
    • Constructor Detail

      • CtCommentImpl

        public CtCommentImpl()
    • Method Detail

      • getContent

        public java.lang.String getContent()
        Description copied from interface: CtComment
        Get the content of the comment
        Specified by:
        getContent in interface CtComment
        the content of the comment
      • getRawContent

        public java.lang.String getRawContent()
        Specified by:
        getRawContent in interface CtComment
        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 CtComment.setContent(String) doesn't influence the returned value, only the value of the position object.
      • _setRawContent

        public <E extends CtComment> E _setRawContent​(java.lang.String content)
        FOR ADVANCED USAGE ONLY Set the comment content, without cleaning the comment, if the cleaning behavior to get a canonical version does not work for you. Does not ensure any AST contract such as calling the change listener You have to cast your comment to CtCommentImpl, it's not beautiful, but it's known :-)
      • equals

        public boolean equals​(java.lang.Object o)
        The comments are not printed during the CtElement equality. The method is this overridden for CtComment.
        equals in class CtElementImpl
      • asJavaDoc

        public CtJavaDoc asJavaDoc()
        Description copied from interface: CtComment
        Utility method to for casting the object, throws an exception if not of the correct type
        Specified by:
        asJavaDoc in interface CtComment