Search code examples
javaapijavadoc

How can I prevent a package-private interface appearing in Javadoc?


I've got a class like this:

package org.jjerms.thing;

interface IThing {
    void doSomething();
}

final class Thing implements IThing {
    /**
     * This Javadoc pretends (to users outside the package) 
     * that doSomething originates here.
     */   
    public void doSomething() {
        // some code...
    }
}

And when I look at the Javadoc for Thing#doSomething in Eclipse but from another package, the Javadoc viewer talks about IThing (it says soSomething specified in IThing).

Can I prevent this? I don't want clients to know anything about IThing.


Solution

  • Pass -exclude to the javadoc tool.