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

javadoc referenced classes do not include classes in method bodies

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.3.0
    • tools

      Name: skT45625 Date: 06/30/2000
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      According to the documentation for javadoc at
      http://java.sun.com/j2se/1.3/docs/tooldocs/win32/javadoc.html#referencedclasses
      "referenced classes" include "classes used in method bodies". The documentation
      for @see and @link tags says they can refer to any referenced class. However,
      this is not the case in practice.

      Here is an example:

      public class Test
      {
      /**
      * Writes an {@link Integer Integer} to {@link System#out System.out}.
      *
      */
      public static void main( String[] args )
      {
      System.out.println( new Integer( 3 ) );
      }
      }

      Run command with Java 2 Platform v1.3 package-list file in current directory:
      javadoc -linkoffline http://java.sun.com/products/jdk/1.3/docs/api . Test

      Output is:
      Loading source file for class Test...
      Constructing Javadoc information...
      Building tree for all the packages and classes...
      Building index for all the packages and classes...
      Generating overview-tree.html...
      Generating index-all.html...
      javadoc: warning - Tag @link: Class or Package not found: Integer Integer
      javadoc: warning - Tag @link: Class or Package not found: System#out System.out
      Generating deprecated-list.html...
      Building index for all classes...
      Generating allclasses-frame.html...
      Generating index.html...
      Generating packages.html...
      Generating Test.html...
      javadoc: warning - Tag @link: Class or Package not found: Integer Integer
      javadoc: warning - Tag @link: Class or Package not found: System#out System.out
      javadoc: warning - Tag @link: Class or Package not found: Integer Integer
      javadoc: warning - Tag @link: Class or Package not found: System#out System.out
      Generating serialized-form.html...
      Generating package-list...
      Generating help-doc.html...
      Generating stylesheet.css...
      6 warnings

      If you decide that the documentation for javadoc is incorrect and the current
      behaviour is intentional, then please treat this as an RFE to include classes in
      method bodies as referenced classes that can be used in @see and @link tags. I
      think my example is a reasonable use of a @link tag, and I shouldn't need to add
      import statements for classes in the code that I refer to in a @link tag.
      (Review ID: 106745)
      ======================================================================

            gafter Neal Gafter (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: