Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219958

Automatically load taglets from a jar file

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 13
    • 1.4.2
    • tools

      Users have asked to be able to put multiple taglets in a single jar file
      and load them, rather than having to call out each taglet separately.

      To solve this problem, we can use java.util.ServiceLoader to load any
      taglets that are registered in any jar files on the taglet path.

      A jarfile containing taglets to be registered must provide provider configuration
      file in the jar's META-INF/services directory that lists all the taglets in that jar.
      The file would have the qualified name of the Taglet interface.
      TagletManager will use java.util.ServiceLoader to load all the taglets on the list.

      The -taglet option would not be required.

      The -tag options would be optional. If omitted, the tags would
      be printed in the order specified in the file in the services directory.

      To suppress a tag, they could use the X option:
      -tag todo:X

      Loading the jar file should print the taglets as they are loaded so
      you could be informed of which tag names are being used.

      The mechanism will work for a taglet path specified on the command line
      with -tagletpath, or using a file manager with a suitable TAGLET_PATH
      when using the javax.tools.DocumentationTool API.

            pmuthuswamy Priya Lakshmi Muthuswamy (Inactive)
            pmuthuswamy Priya Lakshmi Muthuswamy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: