2

This maybe the same issue with How can I prevent a package-private interface appearing in Javadoc?. But I thing the situation is a little bit different.

interface Child<P> { // package-private!!! internal-use only!!!
    P getParent();
    void setParent(P parent);
}

public class John implements Child<Jane> {
}

When I generate the javadoc, I see following definitions on John's page.

getParent
    public P getParent()
setParent
    public void setParent(P parent)

Is this normal? Is there any way to hide those methods defined in the package-private interface?

Community
  • 1
  • 1
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184

1 Answers1

3

from the JavaTutorials:

The interface body can contain abstract methods, default methods, and static methods. An abstract method within an interface is followed by a semicolon, but no braces (an abstract method does not contain an implementation). Default methods are defined with the default modifier, and static methods with the static keyword. All abstract, default, and static methods in an interface are implicitly public, so you can omit the public modifier.

Take a look at this link to see if the provided approach helps you to hide the desired methods of the javadoc.

Community
  • 1
  • 1
guilhermerama
  • 750
  • 9
  • 21