Package org.jibx.schema.generator
Class DocumentFormatter
java.lang.Object
org.jibx.schema.generator.DocumentFormatter
- All Implemented Interfaces:
IDocumentFormatter
Formatter for JavaDoc conversion to XML documentation components.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Document
Document used for constructing DOM components.Fields inherited from interface org.jibx.custom.classes.IDocumentFormatter
DEFAULT_IMPLEMENTATION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondocToNodes
(String jdoc) Convert JavaDoc text to a list of formatted nodes.getClassDocumentation
(IClass info) Get formatted documentation from class, in the form of a list oforg.w3c.dom.Node
instances.Get formatted documentation from class item, in the form of a list oforg.w3c.dom.Node
instances.protected Node
reformDocSegment
(String jdoc) Reformat a segment of JavaDoc text as either a CDATA section (if it contains embedded HTML tags) or a simple text node.
-
Field Details
-
m_document
Document used for constructing DOM components.
-
-
Constructor Details
-
DocumentFormatter
public DocumentFormatter()Constructor.
-
-
Method Details
-
reformDocSegment
Reformat a segment of JavaDoc text as either a CDATA section (if it contains embedded HTML tags) or a simple text node. This also replaces line breaks with single spaces, so that the output format will not use indenting based on the original supplied text.- Parameters:
jdoc
- raw JavaDoc text- Returns:
- formatted text
-
docToNodes
Convert JavaDoc text to a list of formatted nodes.- Specified by:
docToNodes
in interfaceIDocumentFormatter
- Parameters:
jdoc
- JavaDoc text (may benull
)- Returns:
- formatted representation (may be
null
)
-
getClassDocumentation
Get formatted documentation from class, in the form of a list oforg.w3c.dom.Node
instances.- Specified by:
getClassDocumentation
in interfaceIDocumentFormatter
- Parameters:
info
- class information- Returns:
- formatted documentation (
null
if none)
-
getItemDocumentation
Get formatted documentation from class item, in the form of a list oforg.w3c.dom.Node
instances.- Specified by:
getItemDocumentation
in interfaceIDocumentFormatter
- Parameters:
info
- item information- Returns:
- formatted documentation (
null
if none)
-