Interface CtJavaDoc

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

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
      Returns:
      the tag list
    • setTags

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

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

      <E extends CtJavaDoc> E addTag(int index, CtJavaDocTag tag)
      Add a new tag at the index position
      Parameters:
      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
      Parameters:
      index - the position of the tag to remove
    • removeTag

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

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

      String getLongDescription()
      Get the long description of the javadoc
      Returns:
      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