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

StandardDoclet should provide access to Reporter and Locale

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 17
    • tools
    • None
    • binary
    • minimal
    • Hide
      new methods on a concrete class.
      Show
      new methods on a concrete class.
    • Java API

      Summary

      Provide access to the Reporter and Locale for the StandardDoclet.

      Problem

      StandardDoclet supports arbitrary plugin "taglets", but does not provide a way for taglets to access the reporter and locale provided to the doclet when it was initialized. The workaround today is to use reflection to access the doclet's internal state!

      Solution

      Add methods to StandardDoclet to access the locale and reporter.

      Specification

      The following methods will be added to the jdk.javadoc.doclet.StandardDoclet class:

      /**
       * {@return the locale for this doclet}
       *
       * @see #init(Locale, Reporter)
       *
       * @since 17
       */
      public Locale getLocale() {
          return htmlDoclet.getConfiguration().getLocale();
      }
      
      /**
       * {@return the reporter for this doclet}
       *
       * @see #init(Locale, Reporter)
       *
       * @since 17
       */
      public Reporter getReporter() {
          return htmlDoclet.getConfiguration().getReporter();
      }

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Pavel Rappo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: