Skip to content

Commit

Permalink
Reference the javadoc-parser submodule in spoon element's documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen committed Dec 25, 2022
1 parent b210e3d commit 60beb63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/main/java/spoon/reflect/code/CtJavaDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

/**
* This code element defines a javadoc comment
*
* <p><br>
* Further utilities to parse javadoc comments to an AST with resolved references can be found in the
* <a href="https://spoon.gforge.inria.fr/spoon_javadoc.html">spoon-javadoc</a> submodule.
* <p><br>>
* Example:
* <pre>
* &#x2F;**
Expand Down
16 changes: 10 additions & 6 deletions src/main/java/spoon/reflect/declaration/CtElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ <A extends Annotation> CtAnnotation<A> getAnnotation(

/**
* Returns the text of the documentation ("javadoc") comment of this
* element. It contains the text of Javadoc together with the tags.
*
* If one only wants only the text without the tag, one can call `getComments().get(0).getContent()`
*
* If one wants to analyze the tags, one can call `getComments().get(0).asJavaDoc().getTags()`
*
* element. It contains the text of Javadoc together with the block tags.
* <p>
* To get only the text without block tags, use {@code getComments().get(0).getContent()}.
* <p>
* To instead extract block tags, use {@code getComments().get(0).asJavaDoc().getTags()}.
* <p><br>
* To obtain an <strong>AST representation of the comment with resolved references</strong>,
* you can use the {@code JavadocParser} from
* <a href="https://spoon.gforge.inria.fr/spoon_javadoc.html">spoon-javadoc</a>.
* <p>
* See also {@link #getComments()}.and {@link spoon.reflect.code.CtJavaDoc}
*/
@DerivedProperty
Expand Down

0 comments on commit 60beb63

Please sign in to comment.