java.lang.Object
org.jdrupes.mdoclet.internal.doclets.formats.html.HtmlDocletWriter
org.jdrupes.mdoclet.internal.doclets.formats.html.IndexWriter

public class IndexWriter extends HtmlDocletWriter
Generator for either a single index or split index for all documented elements, terms defined in some documentation comments, and summary pages.
Siehe auch:
  • Felddetails

  • Konstruktordetails

    • IndexWriter

      protected IndexWriter(HtmlConfiguration configuration, DocPath path)
      Creates a writer that can write a page containing some or all of the overall index.
      Parameter:
      configuration - the current configuration
      path - the file to be generated
  • Methodendetails

    • generate

      public static void generate(HtmlConfiguration configuration) throws DocFileIOException
      Generates the main index of all documented elements, terms defined in some documentation comments, and summary pages.

      If HtmlOptions.splitIndex() is true, a separate page is generated for each initial letter; otherwise, a single page is generated for all items in the index.

      Parameter:
      configuration - the configuration
      Löst aus:
      DocFileIOException - if an error occurs while writing the files
    • generateIndexFile

      protected void generateIndexFile(List<Character> allFirstCharacters, List<Character> displayFirstCharacters) throws DocFileIOException
      Generates a page containing some or all of the overall index.
      Parameter:
      allFirstCharacters - the initial characters of all index items
      displayFirstCharacters - the initial characters of the index items to appear on this page
      Löst aus:
      DocFileIOException - if an error occurs while writing the page
    • addContents

      protected void addContents(char ch, SortedSet<IndexItem> items, Content content)
      Adds a set of items to the page.
      Parameter:
      ch - the first character of the names of the items
      items - the items
      content - the content to which to add the items
    • addHeading

      protected void addHeading(char ch, Content content)
      Adds a heading containing the first character for a set of items.
      Parameter:
      ch - the first character of the names of the items
      content - the content to which to add the items
    • addDescription

      protected void addDescription(IndexItem indexItem, Content dl)
      Adds the description for an index item into a list.
      Parameter:
      indexItem - the item
      dl - the list
    • addElementDescription

      protected void addElementDescription(IndexItem item, Content target)
      Add one line summary comment for the item.
      Parameter:
      item - the item to be documented
      target - the content to which the description will be added
    • addClassInfo

      protected void addClassInfo(TypeElement te, Content content)
      Adds information for the given type element.
      Parameter:
      te - the element
      content - the content to which the class info will be added
    • addTagDescription

      protected void addTagDescription(IndexItem item, Content target)
      Adds a description for an item found in a documentation comment.
      Parameter:
      item - the item
      target - the list to which to add the description
    • addComment

      protected void addComment(Element element, Content content)
      Adds a comment for an element in the index.

      If the element is deprecated and it has a @deprecated tag, use that comment; otherwise, if the containing class for this element is deprecated, then add the word “Deprecated.” at the start and then print the normal comment.

      Parameter:
      element - the element
      content - the content to which the comment will be added
    • addMemberDesc

      protected void addMemberDesc(Element member, TypeElement enclosing, Content content)
      Adds a description for a member element.
      Parameter:
      member - the element
      enclosing - the enclosing type element
      content - the content to which the member description will be added
    • addLinksForIndexes

      protected void addLinksForIndexes(List<Character> allFirstCharacters, Content content)
      Add links for all the index files, based on the first character of the names of the items.
      Parameter:
      allFirstCharacters - the list of all first characters to be linked
      content - the content to which the links for indexes will be added