简体   繁体   English

如何防止包私有接口出现在 Javadoc 中?

[英]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).当我在 Eclipse 中查看 Thing#doSomething 的 Javadoc 但从另一个包时,Javadoc 查看器谈到了 IThing(它说 IThing 中指定的 soSomething)。

Can I prevent this?我可以防止这种情况吗? I don't want clients to know anything about IThing.我不希望客户对 IThing 一无所知。

-exclude传递给javadoc工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java教程说我可以有一个包 - 私有接口,但我不能 - Java tutorial says I can have a package-private interface, but I can't javadoc和包的私有接口? - javadoc and package private interface? 如何在 IntelliJ 中禁用“访问可以是包私有的”消息? - How to disable "Access can be package-private" message in IntelliJ? 如何在 Java 中的包私有声明中破坏封装 - How can be encapsulation broken in package-private declarations in Java 我们如何测试包私有类? - How can we test package-private class? 应用程序类可以是包私有的吗? - Can Application class be package-private? 什么相当于封装私有功能的封装专用接口? - What is equivalent to a package-private interface for encapsulating internal functionality of a package? 为什么我无法访问android.widget包中的package-private字段? - Why can't I access package-private fields in the android.widget package? 为什么不能在同一个包中调用另一个类的包私有方法呢? - Why can't I call a package-private method of another class that's a subclass of a class in the same package? Java如何保护私有变量,程序包私有变量和受保护变量? - How does Java protect private, package-private, and protected variables?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM