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

纵饮孤独 提交于 2019-12-06 07:21:52

问题


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.


回答1:


Pass -exclude to the javadoc tool. If you want more control then use this.

Happy coding.



来源:https://stackoverflow.com/questions/1537220/how-can-i-prevent-a-package-private-interface-appearing-in-javadoc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!