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

Need Doclet API support for substituted type parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • tools
    • None

      The substituted type parameters are currently omitted from several places in the output. To support this kind of output, we need to make the following additions to the doclet API:

      ParameterizedType.superclassType(); // each returns a ClassDoc, or
      ParameterizedType.interfaceTypes(); // a ParameterizedType with
      // parameters already
      // substituted

      After these additions are made to the API, the following changes will be made to the standard doclet (tracked by bug 5029946):

      1. Top-level heading ("Class AbstractList<E>"):

      Leave as is.


      2. "All Implemented Interfaces:"

      Include the substituted type parameters (so Iterable<E> not Iterable<T>).
      The doclet shouldn't do the hard work to make those substitutions happen:
      it needs support from the doclet API.


      3. Class hierarchy diagram:

      Same as #3.


      4. "Direct Known Subclasses:"

      Omit the type parameters. They're unbound, and so are just confusing.
      This is inconsistent visually with #2 and #3, but that's OK.

      5. "Specified by:"

      Not necessary to include the type parameters, since they'll be available
      up top in the "All Implemented Interfaces" section. But it should be
      easy for the doclet to match up an interface name with the appropriate
      type parameters, in which case they'd be very nice to have. I'd say go
      for it.


      6. "Overrides:"

      Not necessary but nice to have, as with #5. Unlike #5 there is already
      support in the doclet API for getting the type parameters. However,
      until #5 includes type parameters, I wonder if showing them
      here seems too inconsistent (I could go either way on this).


      In the cases where type parameter information is desired but not yet
      available to the doclet, for the initial putback I strongly recommend
      omitting the parameters rather than showing the wrong thing. We'll
      hope to get permission to add the new functionality later. This applies
      to items #2 and #3, and optionally to #5 and #6.

            sseligmasunw Scott Seligman (Inactive)
            jhosunw Jamie Ho (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: