Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3965628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:29:25+00:00 2026-05-20T03:29:25+00:00

I would like class B to inherit the Javadoc from an interface that it

  • 0

I would like class B to inherit the Javadoc from an interface that it implements, interface A. I have included the source for interface A in my Javadoc command, and class B correctly inherits the documentation.

Now I’m wondering if I can make the links it generates point to interface A‘s documentation on the web, rather than duplicating it on my site, i.e. the “Specified by:” links will link to an external page.

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:29:26+00:00Added an answer on May 20, 2026 at 3:29 am

    It is possible, yes.
    For being able to include inherited documentation, the source of interface A has to be findable in the sourcepath of javadoc, but should not be in the list of packages passed to javadoc for documentation creation.
    For linking, use the -link parameter. I just tried this (with the ant javadoc task):

    <javadoc destdir="docs">
      <sourcepath>
        <!-- source of your class B -->
        <pathelement location="src" /> 
        <!-- source of external interface A -->
        <pathelement location="../example-src/src" />
      </sourcepath>
    
      <!-- your packages, to generate the docs for -->
      <package name="com.personal.myproject.*" />
    
      <!-- the location of the online documentation -->
      <link href="http://example.com/javadoc/"/>
    </javadoc>
    

    To command line javadoc, I think this translates like this (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 package com.personal.myproject,
    • interface A is in package com.example,
    • my own sources are in src,
    • the sources for interface A are in ../example-src/src.

    In a example class created for this, javadoc would copy the documentation from A.methodName() to B.methodName(), but 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 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database that I would like class files generated from, and also
I would like a class to implement an interface, I do not want to
I would like to create a class that creates and manages log files. I
I would like to make a child class that has a method of the
I would like to add an operator to a class. I currently have a
I would like to be able to achieve something like this: class Zot {
In Java, it would look like this: class Foo { float[] array; } Foo
I would like to give a class a unique ID every time a new
I would like to access a class everywhere in my application, how can I
I would like my Core assembly to not expose a certain class and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.