Interface CtJavaDoc

All Superinterfaces:
Cloneable, CtCodeElement, CtComment, CtElement, CtQueryable, CtStatement, CtVisitable, FactoryAccessor, Serializable, SourcePositionHolder
All Known Implementing Classes:

public interface CtJavaDoc extends CtComment
This code element defines a javadoc comment Example:
  * Description
  * @tag a tag in the javadoc
  • Method Details

    • getTags

      List<CtJavaDocTag> getTags()
      Get all the tag of the javadoc
      the tag list
    • setTags

      <E extends CtJavaDoc> E setTags(List<CtJavaDocTag> tags)
      Define the list of tags
      tags - the new list of tags
    • addTag

      <E extends CtJavaDoc> E addTag(CtJavaDocTag tag)
      Add a new tag at the end of the list
      tag - the new tag
    • addTag

      <E extends CtJavaDoc> E addTag(int index, CtJavaDocTag tag)
      Add a new tag at the index position
      index - the index of the new tag
      tag - the new tag
    • removeTag

      <E extends CtJavaDoc> E removeTag(int index)
      Remove a tag from the index
      index - the position of the tag to remove
    • removeTag

      <E extends CtJavaDoc> E removeTag(CtJavaDocTag tag)
      Remove a specific tag
      tag - the tag to remove
    • getShortDescription

      String getShortDescription()
      Get the short summary of the javadoc (first sentence of the javadoc)
      the summary of the javadoc
    • getLongDescription

      String getLongDescription()
      Get the long description of the javadoc
      the long description of the javadoc
    • clone

      CtJavaDoc clone()
      Description copied from interface: CtElement
      Clone the element which calls this method in a new object. Note that that references are kept as is, and thus, so if you clone whole classes or methods, some parts of the cloned element (eg executable references) may still point to the initial element. In this case, consider using methods Refactoring.copyType(CtType) and Refactoring.copyMethod(CtMethod) instead which does additional work beyond cloning.
      Specified by:
      clone in interface CtCodeElement
      Specified by:
      clone in interface CtComment
      Specified by:
      clone in interface CtElement
      Specified by:
      clone in interface CtStatement
    • getJavadocElements

      List<JavadocDescriptionElement> getJavadocElements()
      Returns the list of parsed Javadoc elements