Package spoon.reflect.code
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 */
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface spoon.reflect.code.CtComment
CtComment.CommentType
-
-
Field Summary
-
Fields inherited from interface spoon.reflect.code.CtComment
LINE_SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends CtJavaDoc>
EaddTag(int index, CtJavaDocTag tag)
Add a new tag at the index position<E extends CtJavaDoc>
EaddTag(CtJavaDocTag tag)
Add a new tag at the end of the listCtJavaDoc
clone()
Clone the element which calls this method in a new object.List<JavadocDescriptionElement>
getJavadocElements()
Returns the list of parsed Javadoc elementsString
getLongDescription()
Get the long description of the javadocString
getShortDescription()
Get the short summary of the javadoc (first sentence of the javadoc)List<CtJavaDocTag>
getTags()
Get all the tag of the javadoc<E extends CtJavaDoc>
EremoveTag(int index)
Remove a tag from the index<E extends CtJavaDoc>
EremoveTag(CtJavaDocTag tag)
Remove a specific tag<E extends CtJavaDoc>
EsetTags(List<CtJavaDocTag> tags)
Define the list of tags-
Methods inherited from interface spoon.reflect.code.CtCodeElement
partiallyEvaluate
-
Methods inherited from interface spoon.reflect.code.CtComment
asJavaDoc, getCommentType, getContent, getRawContent, setCommentType, setContent
-
Methods inherited from interface spoon.reflect.declaration.CtElement
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelow
-
Methods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, map
-
Methods inherited from interface spoon.reflect.code.CtStatement
comment, getLabel, insertAfter, insertAfter, insertBefore, insertBefore, setLabel
-
Methods inherited from interface spoon.reflect.visitor.CtVisitable
accept
-
Methods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactory
-
-
-
-
Method Detail
-
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 tagtag
- 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 methodsRefactoring.copyType(CtType)
andRefactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.- Specified by:
clone
in interfaceCtCodeElement
- Specified by:
clone
in interfaceCtComment
- Specified by:
clone
in interfaceCtElement
- Specified by:
clone
in interfaceCtStatement
-
getJavadocElements
List<JavadocDescriptionElement> getJavadocElements()
Returns the list of parsed Javadoc elements
-
-