java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.taglets.TagletWriter
Bekannte direkte Unterklassen:
TagletWriterImpl

public abstract class TagletWriter extends Object
The interface for the taglet writer.
  • Felddetails

    • isFirstSentence

      protected final boolean isFirstSentence
      True if we only want to write the first sentence.
  • Konstruktordetails

    • TagletWriter

      protected TagletWriter(boolean isFirstSentence)
  • Methodendetails

    • getOutputInstance

      public abstract Content getOutputInstance()
      Returns an instance of an output object.
      Gibt zurück:
      an instance of an output object
    • codeTagOutput

      protected abstract Content codeTagOutput(Element element, LiteralTree tag)
      Returns the output for a {@code …} tag.
      Parameter:
      element - The element that owns the doc comment
      tag - the tag
      Gibt zurück:
      the output
    • indexTagOutput

      protected abstract Content indexTagOutput(Element element, IndexTree tag)
      Returns the output for a {@index…} tag.
      Parameter:
      element - The element that owns the doc comment
      tag - the tag
      Gibt zurück:
      the output
    • getDocRootOutput

      protected abstract Content getDocRootOutput()
      Returns the output for a {@docRoot} tag.
      Gibt zurück:
      the output
    • deprecatedTagOutput

      protected abstract Content deprecatedTagOutput(Element element)
      Returns the output for a @deprecated tag.
      Parameter:
      element - The element that owns the doc comment
      Gibt zurück:
      the output
    • linkTagOutput

      protected abstract Content linkTagOutput(Element element, LinkTree tag)
      Returns the output for a {@link …} or {@linkplain …} tag.
      Parameter:
      element - The element that owns the doc comment
      tag - the tag
      Gibt zurück:
      the output
    • literalTagOutput

      protected abstract Content literalTagOutput(Element element, LiteralTree tag)
      Returns the output for a {@literal …} tag.
      Parameter:
      element - The element that owns the doc comment
      tag - the tag
      Gibt zurück:
      the output
    • getParamHeader

      protected abstract Content getParamHeader(ParamTaglet.ParamKind kind)
      Returns the header for the @param tags.
      Parameter:
      kind - the kind of header that is required
      Gibt zurück:
      the header
    • paramTagOutput

      protected abstract Content paramTagOutput(Element element, ParamTree paramTag, String paramName)
      Returns the output for a @param tag.

      Note we cannot rely on the name in the tag, because we might be inheriting the tag.

      Parameter:
      element - The element that owns the doc comment
      paramTag - the parameter to document
      paramName - the name of the parameter
      Gibt zurück:
      the output
    • returnTagOutput

      protected abstract Content returnTagOutput(Element element, ReturnTree returnTag, boolean inline)
      Returns the output for a @return tag.
      Parameter:
      element - the element that owns the doc comment
      returnTag - the return tag to document
      inline - whether this should be written as an inline instance or block instance
      Gibt zurück:
      the output
    • seeTagOutput

      protected abstract Content seeTagOutput(Element element, List<? extends SeeTree> seeTags)
      Returns the output for @see tags.
      Parameter:
      element - The element that owns the doc comment
      seeTags - the list of tags
      Gibt zurück:
      the output
    • simpleBlockTagOutput

      protected abstract Content simpleBlockTagOutput(Element element, List<? extends DocTree> simpleTags, String header)
      Returns the output for a series of simple tags.
      Parameter:
      element - The element that owns the doc comment
      simpleTags - the list of simple tags
      header - the header for the series of tags
      Gibt zurück:
      the output
    • snippetTagOutput

      protected abstract Content snippetTagOutput(Element element, SnippetTree snippetTag, StyledText text, String id, String lang)
      Returns the output for a {@snippet …} tag.
      Parameter:
      element - The element that owns the doc comment
      snippetTag - the snippet tag
      id - the value of the id attribute, or null if not defined
      lang - the value of the lang attribute, or null if not defined
      Gibt zurück:
      the output
    • specTagOutput

      protected abstract Content specTagOutput(Element element, List<? extends SpecTree> specTags)
      Returns the output for one or more @spec tags.
      Parameter:
      element - the element that owns the doc comment
      specTags - the array of @spec tags.
      Gibt zurück:
      the output
    • systemPropertyTagOutput

      protected abstract Content systemPropertyTagOutput(Element element, SystemPropertyTree systemPropertyTag)
      Returns the output for a {@systemProperty…} tag.
      Parameter:
      element - the element that owns the doc comment
      systemPropertyTag - the system property tag
      Gibt zurück:
      the output
    • getThrowsHeader

      protected abstract Content getThrowsHeader()
      Returns the header for the @throws tag.
      Gibt zurück:
      the header for the throws tag
    • throwsTagOutput

      protected abstract Content throwsTagOutput(TypeMirror throwsType, Optional<Content> content)
      Returns the output for a default @throws tag.
      Parameter:
      throwsType - the type that is thrown
      content - the optional content to add as a description
      Gibt zurück:
      the output
    • valueTagOutput

      protected abstract Content valueTagOutput(VariableElement field, String constantVal, boolean includeLink)
      Returns the output for a {@value} tag.
      Parameter:
      field - the constant field that holds the value tag
      constantVal - the constant value to document
      includeLink - true if we should link the constant text to the constant field itself
      Gibt zurück:
      the output
    • invalidTagOutput

      protected abstract Content invalidTagOutput(String summary, Optional<String> detail)
      Returns the output for an invalid tag.

      The returned content uses special styling to highlight the problem. Depending on the presence of the detail string the method returns a plain text span or an expandable component.

      Parameter:
      summary - the single-line summary message
      detail - the optional detail message which may contain preformatted text
      Gibt zurück:
      the output
    • getCurrentPageElement

      protected abstract TypeElement getCurrentPageElement()
      Returns the main type element of the current page or null for pages that don’t have one.
      Gibt zurück:
      the type element of the current page or null.
    • getBlockTagOutput

      public Content getBlockTagOutput(TagletManager tagletManager, Element element, List<Taglet> taglets)
      Returns the content generated from the block tags for a given element.

      The content is generated according to the order of the list of taglets. The result is a possibly-empty list of the output generated by each of the given taglets for all of the tags they individually support.

      Parameter:
      tagletManager - the manager that manages the taglets
      element - the element that we are to write tags for
      taglets - the taglets for the tags to write
      Gibt zurück:
      the content
    • getInlineTagOutput

      public Content getInlineTagOutput(Element holder, TagletManager tagletManager, DocTree inlineTag)
      Returns the content generated from an inline tag in the doc comment for a given element, or null if the tag is not supported or does not return any output.
      Parameter:
      holder - the element associated with the doc comment
      tagletManager - the taglet manager for the current doclet
      inlineTag - the inline tag to be documented
      Gibt zurück:
      the content, or null
    • commentTagsToOutput

      public abstract Content commentTagsToOutput(DocTree holderTree, List<? extends DocTree> trees)
      Converts inline tags and text to content, expanding the inline tags along the way.

      Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to block tags.

      Parameter:
      holderTree - the tree that holds the documentation
      trees - list of DocTree nodes containing text and inline tags (often alternating) present in the text of interest for this doc
      Gibt zurück:
      the generated content
    • commentTagsToOutput

      public abstract Content commentTagsToOutput(Element element, List<? extends DocTree> trees)
      Converts inline tags and text to content, expanding the inline tags along the way.

      Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to block tags.

      Parameter:
      element - The element that owns the documentation
      trees - list of DocTree nodes containing text and inline tags (often alternating) present in the text of interest for this doc
      Gibt zurück:
      the generated content
    • commentTagsToOutput

      public abstract Content commentTagsToOutput(Element element, DocTree holder, List<? extends DocTree> trees, boolean isFirstSentence)
      Converts inline tags and text to content, expanding the inline tags along the way.

      Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to non-inline tags.

      Parameter:
      element - the element where comment resides
      holder - the tag that holds the documentation
      trees - array of text tags and inline tags (often alternating) present in the text of interest for this doc
      isFirstSentence - true if this is the first sentence
      Gibt zurück:
      the generated content
    • configuration

      public abstract BaseConfiguration configuration()
      Returns an instance of the configuration used for this doclet.
      Gibt zurück:
      an instance of the configuration used for this doclet