Sometimes it is needed to embed the code of the whole interface or class declaration, but to show only its API entry points.
Showing all the code with the Javadoc or KDoc comments is overwhelming in such a scenario. We don't want the reader to read all those API docs while reading the text of the documentation.
The comments parameter would serve such a need. It will allow embed-code to show the code without all the comments.
The tag would look like this:
<embed-code
file="$runtime/src/main/java/io/spine/validation/ValidatingBuilder.java"
start="public interface ValidatingBuilder"
end="^\}"
comments="false">
</embed-code>
Possible values for the comment paraneter:
"false" — all comments are stripped
"true" — all comments are retained
"documentation" — Javadoc, KDoc, and similar API-level comments are passed
"end-of-line" — such as // are kept
"block" — comments like /* */ are retained, others are stripped.
Sometimes it is needed to embed the code of the whole interface or class declaration, but to show only its API entry points.
Showing all the code with the Javadoc or KDoc comments is overwhelming in such a scenario. We don't want the reader to read all those API docs while reading the text of the documentation.
The
commentsparameter would serve such a need. It will allowembed-codeto show the code without all the comments.The tag would look like this:
Possible values for the
commentparaneter:"false"— all comments are stripped"true"— all comments are retained"documentation"— Javadoc, KDoc, and similar API-level comments are passed"end-of-line"— such as//are kept"block"— comments like/* */are retained, others are stripped.