Class DefaultJavaDocRenderer
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.DefaultJavaDocRenderer
-
- All Implemented Interfaces:
JavaDocRenderer
- Direct Known Subclasses:
NoAuthorJavaDocRenderer
public class DefaultJavaDocRenderer extends Object implements JavaDocRenderer
Default JavaDocRenderer implementation which provides a plain JavaDocData rendering, on the form:
[JavaDoc comment] (tag1): [tag1 value] (tag2): [tag2 value]
- Since:
- 2.0
- Author:
- Lennart Jörelid, jGuru Europe AB
-
-
Constructor Summary
Constructors Constructor Description DefaultJavaDocRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
harmonizeNewlines(String original)
Squashes newline characters intoString
render(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
-
-
-
Method Detail
-
render
public String render(JavaDocData nonNullData, SortableLocation location)
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
protected String renderJavaDocComment(String comment, SortableLocation location)
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
protected String renderJavaDocTag(String name, String value, SortableLocation location)
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.
-
-