java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.taglets.TagletManager

public class TagletManager extends Object
Manages the Taglets used by doclets.
  • Konstruktordetails

    • TagletManager

      public TagletManager(BaseConfiguration configuration)
      Constructs a new TagletManager.
      Parameter:
      configuration - the configuration for this taglet manager
  • Methodendetails

    • getAllTagletNames

    • initTagletPath

      public void initTagletPath(JavaFileManager fileManager) throws IOException
      Initializes the location TAGLET_PATH which is used to locate the custom taglets.
      Parameter:
      fileManager - the file manager to load classes and resources
      Löst aus:
      IOException - if an error occurs while setting the location
    • addCustomTag

      public void addCustomTag(String classname, JavaFileManager fileManager)
      Adds a new Taglet.

      Prints a message to indicate whether or not the Taglet was registered properly.

      Parameter:
      classname - the name of the class representing the custom tag
      fileManager - the file manager to load classes and resources
    • loadTaglets

      public void loadTaglets(JavaFileManager fileManager) throws IOException
      Loads taglets from a taglet path using the service loader.
      Parameter:
      fileManager - the file manager to load the taglets
      Löst aus:
      IOException - if an error occurs while getting the service loader
    • addNewSimpleCustomTag

      public void addNewSimpleCustomTag(String tagName, String header, String locations)
      Adds a new SimpleTaglet.

      If this tag already exists and the header passed as an argument is null, move tag to the back of the list. If this tag already exists and the header passed as an argument is not null, overwrite previous tag with the new one. Otherwise, add a new SimpleTaglet to the list.

      Parameter:
      tagName - the name of this tag
      header - the header to output
      locations - the possible locations that this tag can appear in
    • checkTags

      public void checkTags(Element element, Iterable<? extends DocTree> trees)
      Given a series of DocTrees, check for misuse and spelling mistakes.
      Parameter:
      element - the tags holder
      trees - the trees containing the comments
    • getSerializedFormTaglets

      Returns the taglets that can appear in the serialized form.
      Gibt zurück:
      the taglet that can appear in the serialized form
    • getBlockTaglets

      Returns the custom tags for a given element.
      Parameter:
      e - the element to get custom tags for
      Gibt zurück:
      the array of Taglets that can appear in the given element
    • isKnownCustomTag

      public boolean isKnownCustomTag(String tagName)
    • printReport

      public void printReport()
      Print a list of Taglets that might conflict with standard tags in the future and a list of standard tags that have been overridden.