-
Enhancement
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.0
-
generic
-
generic
Name: eaC66865 Date: 11/26/2002
> It might make sense to include a few words on using the doclet
> API in the RootDoc class.
>
> There seem to me to be two ways to process the contents of the
> rootdoc tree:
> 1. Use allClasses
> This gives you a listing you could sort. It's sort of the
> "index" version of the tree.
>
> 2. Use specifiedPackages() plus specifiedClasses(). For each
> package use allClasses
> This gives you a classes in package order.
> Note:
> If a class is specified on the command line in a package
> that is also specified on the command line, the ClassDoc
> is in the package list. (To verify: Whether it is not then
> in the specifiedClasses() list, or whether it is *also* in
> the specifiedClasses() list.
>
To which Doug replied:
It appears javadoc solves this by not accepting duplicate classes.
When I supply a class (Class1.java) in both a package and a source
filename, I get a duplicate class error, and the source filename is
not accepted, and it does not appear in the "specifiedClasses()" list:
% more run-classesandpackages
/java/re/jdk/1.4.1/latest/binaries/solaris-sparc/bin/javadoc -doclet com.sun.tools.doclets.test.TestDoclet -docletpath com/sun/tools/doclets/test -sourcepath ../../1.4/sample-src -d output-classesandpackages ../../1.4/sample-src/com/package1/Class1.java com.package1 com.package1.subpackage com.package2
% run-classesandpackages
Loading source file ../../1.4/sample-src/com/package1/Class1.java...
Loading source file
../../1.4/sample-src/com/package1/test-files/Test.java...
Loading source files for package com.package1...
Loading source files for package com.package1.subpackage...
Loading source files for package com.package2...
Constructing Javadoc information...
/home/dkramer/javadoc/docletapi/test/../../1.4/sample-src/com/package1/Class1.java:65:
duplicate class: com.package1.Class1
public class Class1 implements Interface1 {
^
If I reverse the order on the command line, putting the source
filename first, I get the same results.
======================================================================
> It might make sense to include a few words on using the doclet
> API in the RootDoc class.
>
> There seem to me to be two ways to process the contents of the
> rootdoc tree:
> 1. Use allClasses
> This gives you a listing you could sort. It's sort of the
> "index" version of the tree.
>
> 2. Use specifiedPackages() plus specifiedClasses(). For each
> package use allClasses
> This gives you a classes in package order.
> Note:
> If a class is specified on the command line in a package
> that is also specified on the command line, the ClassDoc
> is in the package list. (To verify: Whether it is not then
> in the specifiedClasses() list, or whether it is *also* in
> the specifiedClasses() list.
>
To which Doug replied:
It appears javadoc solves this by not accepting duplicate classes.
When I supply a class (Class1.java) in both a package and a source
filename, I get a duplicate class error, and the source filename is
not accepted, and it does not appear in the "specifiedClasses()" list:
% more run-classesandpackages
/java/re/jdk/1.4.1/latest/binaries/solaris-sparc/bin/javadoc -doclet com.sun.tools.doclets.test.TestDoclet -docletpath com/sun/tools/doclets/test -sourcepath ../../1.4/sample-src -d output-classesandpackages ../../1.4/sample-src/com/package1/Class1.java com.package1 com.package1.subpackage com.package2
% run-classesandpackages
Loading source file ../../1.4/sample-src/com/package1/Class1.java...
Loading source file
../../1.4/sample-src/com/package1/test-files/Test.java...
Loading source files for package com.package1...
Loading source files for package com.package1.subpackage...
Loading source files for package com.package2...
Constructing Javadoc information...
/home/dkramer/javadoc/docletapi/test/../../1.4/sample-src/com/package1/Class1.java:65:
duplicate class: com.package1.Class1
public class Class1 implements Interface1 {
^
If I reverse the order on the command line, putting the source
filename first, I get the same results.
======================================================================