java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.util.IndexBuilder
Bekannte direkte Unterklassen:
HtmlIndexBuilder

public class IndexBuilder extends Object
An alphabetical index of elements, search tags, and other items.

Two tables are maintained: one is indexed by the first character of each items name; the other is index by the item’s category, indicating the JavaScript file in which the item should be written.

  • Felddetails

    • classesOnly

      protected final boolean classesOnly
      Build this index only for classes?
  • Konstruktordetails

    • IndexBuilder

      public IndexBuilder(BaseConfiguration configuration, boolean noDeprecated)
      Creates a new IndexBuilder.
      Parameter:
      configuration - the current configuration of the doclet
      noDeprecated - true if -nodeprecated option is used, false otherwise
    • IndexBuilder

      public IndexBuilder(BaseConfiguration configuration, boolean noDeprecated, boolean classesOnly)
      Creates a new IndexBuilder.
      Parameter:
      configuration - the current configuration of the doclet
      noDeprecated - true if -nodeprecated option is used, false otherwise
      classesOnly - include only classes in index
  • Methodendetails

    • addElements

      public void addElements()
      Adds all the selected modules, packages, types and their members to the index, or just the type elements if classesOnly is true.
    • add

      public void add(IndexItem item)
      Adds an individual item to the two collections of items.
      Parameter:
      item - the item to add
    • getItems

      Returns a sorted list of items whose names start with the provided character.
      Parameter:
      key - index key
      Gibt zurück:
      list of items keyed by the provided character
    • getFirstCharacters

      Returns a sorted list of the first characters of the labels of index items.
    • getItems

      Returns a sorted list of items in a given category.
      Parameter:
      cat - the category
      Gibt zurück:
      list of items keyed by the provided character
    • getItems

      Returns a sorted list of items with a given kind of doc tree.
      Parameter:
      kind - the kind
      Gibt zurück:
      list of items keyed by the provided character
    • makeTypeSearchIndexComparator

      Returns a Comparator for IndexItems in the types category of the search index.

      Items are compared by short name, falling back to the main comparator if names are equal.

      Gibt zurück:
      a Comparator
    • makeGenericSearchIndexComparator

      Returns a Comparator for IndexItems in the modules, packages, members, and search tags categories of the search index.

      Items are compared by label, falling back to the main comparator if names are equal.

      Gibt zurück:
      a Comparator