Class CodeDocFormat

java.lang.Object
io.github.mmm.code.api.doc.CodeDocFormat
Direct Known Subclasses:
CodeDocFormat.CodeDocFormatAsciiDoc, CodeDocFormat.CodeDocFormatHtml, CodeDocFormat.CodeDocFormatPlainText, CodeDocFormat.CodeDocFormatRaw

public abstract class CodeDocFormat extends Object
Definition of format(s) to be able to convert CodeDoc to.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
See Also:
  • Field Details

  • Constructor Details

    • CodeDocFormat

      public CodeDocFormat()
  • Method Details

    • isReplaceXmlTags

      public abstract boolean isReplaceXmlTags()
      Returns:
      true if XML tags shall be parsed and replaced, false otherwise (if they shall be kept unmodified).
    • replaceXmlTag

      public abstract String replaceXmlTag(Tag tag)
      Parameters:
      tag - the XML Tag to replace.
      Returns:
      the replacement.
    • replaceDocTag

      public abstract String replaceDocTag(String tag, Supplier<CodeDocLink> link, String text)
      Parameters:
      tag - the documentation tag such as CodeDoc.TAG_CODE or CodeDoc.TAG_LINK.
      link - the optional Supplier used to resolve a CodeDocLink in case of link, linkplain, or value tag. Otherwise null.
      text - the plain text.
      Returns:
      the tag converted to this format.
    • toString

      public abstract String toString()
      Overrides:
      toString in class Object