简体   繁体   中英

Method listed twice in JavaDoc

I have two classes and two interfaces. InterfaceA

package ch.sukha.testmachine.client;
interface InterfaceA {
    /**
     * Foo.
     */
    void foo();
}

is the super interface of InterfaceB .

package ch.sukha.testmachine.client;
public interface InterfaceB extends InterfaceA {
   /**
    * Bar.
    */
   void bar();
}

Likewise, class A is the super class of

package ch.sukha.testmachine.client;
class A implements InterfaceA {
    @Override
    public void foo() {
    }
}

class B .

package ch.sukha.testmachine.client;
public class B extends A implements InterfaceB {
    @Override
    public void bar() {
    }
}

In the generated JavaDoc, method foo appears twice.

在此处输入图片说明

A is not exported. I want to create multiple subclasses of A and reuse the documentation of InterfaceA.

Export everything to JavaDoc.

To reuse parts of it, you can use the

@inheritDoc 

annotation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM