Class DefaultJavaDocRenderer
java.lang.Object
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.DefaultJavaDocRenderer
- All Implemented Interfaces:
JavaDocRenderer
- Direct Known Subclasses:
NoAuthorJavaDocRenderer
Default JavaDocRenderer implementation which provides a plain JavaDocData rendering, on the form:
[JavaDoc comment] (tag1): [tag1 value] (tag2): [tag2 value]
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
harmonizeNewlines
(String original) Squashes newline characters intorender
(JavaDocData nonNullData, SortableLocation location) Renders the supplied JavaDocData structure as text to be used within an XSD documentation annotation.protected String
renderJavaDocComment
(String comment, SortableLocation location) Override this method to yield another rendering of the javadoc comment.protected String
renderJavaDocTag
(String name, String value, SortableLocation location) Override this method to yield another
-
Constructor Details
-
DefaultJavaDocRenderer
public DefaultJavaDocRenderer()
-
-
Method Details
-
render
Renders the supplied JavaDocData structure as text to be used within an XSD documentation annotation. The XSD documentation annotation will contain a CDATA section to which the rendered JavaDocData is emitted.
- Specified by:
render
in interfaceJavaDocRenderer
- Parameters:
nonNullData
- the JavaDocData instance to render as XSD documentation. Will never benull
.location
- the SortableLocation where the JavaDocData was harvested. Nevernull
.- Returns:
- The rendered text contained within the XML annotation.
-
renderJavaDocComment
Override this method to yield another rendering of the javadoc comment.- Parameters:
comment
- The comment to render.location
- the SortableLocation where the JavaDocData was harvested. Nevernull
.- Returns:
- The XSD documentation for the supplied JavaDoc comment. A null or empty value will not be rendered.
-
renderJavaDocTag
Override this method to yield another- Parameters:
name
- The name of a JavaDoc tag.value
- The value of a JavaDoc tag.location
- the SortableLocation where the JavaDocData was harvested. Nevernull
.- Returns:
- The XSD documentation for the supplied JavaDoc tag.
-
harmonizeNewlines
Squashes newline characters into- Parameters:
original
- the original string, potentially containing newline characters.- Returns:
- A string where all newline characters are removed
-