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
  • Constructor Details

    • DefaultJavaDocRenderer

      public DefaultJavaDocRenderer()
  • Method Details

    • 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 interface JavaDocRenderer
      Parameters:
      nonNullData - the JavaDocData instance to render as XSD documentation. Will never be null.
      location - the SortableLocation where the JavaDocData was harvested. Never null.
      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. Never null.
      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. Never null.
      Returns:
      The XSD documentation for the supplied JavaDoc tag.
    • harmonizeNewlines

      protected String harmonizeNewlines(String original)
      Squashes newline characters into
      Parameters:
      original - the original string, potentially containing newline characters.
      Returns:
      A string where all newline characters are removed