Probably yes. To be able to include legacy documentation, interface A source must be found in the javadoc source path, but not in the list of packages passed to javadoc to create the documentation. To link, use the -link . I just tried this (with ant javadoc task):
<javadoc destdir="docs"> <sourcepath> <pathelement location="src" /> <pathelement location="../example-src/src" /> </sourcepath> <package name="com.personal.myproject.*" /> <link href="http://example.com/javadoc/"/> </javadoc>
On the javadoc command line, I think it translates as follows (unix syntax, one line):
javadoc -sourcepath ../example-src/src:src -d docs -link http://example.com/javadoc/ -subpackages com.personal.myproject (other options...)
Where
class B is in the package com.personal.myproject ,interface A is in the com.example package,- my own sources are in
src , - The sources for interface A are in
../example-src/src .
In the example created for this, javadoc copied the documentation from A.methodName() to B.methodName() , but the link to the online documentation at http://example.com/javadoc/com/example/A.html#methodName()
Thanks for asking this question, I always wanted to do this :-)
source share