生成的 javadoc 页面不必要地用注释包装方法参数

Generated javadoc pages unneccesarily wrap method arguments with annotations

如果我为方法生成 javadoc,方法 parameters/exceptions 不必要地换行,如下所示:

页面上还有很多横向 space。使用甲骨文 javadoc.exe 8u60.

如何在不手动编辑 HTML 文件的情况下避免这些不必要的换行?

这是截图部分的源码:

<ul class="blockList">
    <li class="blockList">
        <a name="method.detail">
            <!--   -->
        </a>
        <h3>Method Detail</h3>
        <a name="getRootWord--">
            <!--   -->
        </a>
        <ul class="blockList">
            <li class="blockList">
                <h4>getRootWord</h4>
                <pre>@NotNull
public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getRootWord()</pre>
            </li>
        </ul>
        <a name="setRootWord-java.lang.String-">
            <!--   -->
        </a>
        <ul class="blockList">
            <li class="blockList">
                <h4>setRootWord</h4>
                <pre>public&nbsp;void&nbsp;setRootWord(@NotNull
                        <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;rootWord)</pre>
            </li>
        </ul>
        <a name="getAdjectiveDeclension--">
            <!--   -->
        </a>
        <ul class="blockList">
            <li class="blockList">
                <h4>getAdjectiveDeclension</h4>
                <pre>@NotNull
public&nbsp;<a href="../../../../com/kayon/core/adjective/AdjectiveDeclension.html" title="interface in com.kayon.core.adjective">AdjectiveDeclension</a>&nbsp;getAdjectiveDeclension()
                                                     throws <a href="../../../../com/kayon/core/NoDeclensionException.html" title="class in com.kayon.core">NoDeclensionException</a></pre>
                <dl>
                    <dt><span class="throwsLabel">Throws:</span></dt>
                    <dd><code><a href="../../../../com/kayon/core/NoDeclensionException.html" title="class in com.kayon.core">NoDeclensionException</a></code></dd>
                </dl>
            </li>
        </ul>
        <a name="setAdjectiveDeclension-com.kayon.core.adjective.AdjectiveDeclension-">
            <!--   -->
        </a>
        <ul class="blockList">
            <li class="blockList">
                <h4>setAdjectiveDeclension</h4>
                <pre>public&nbsp;void&nbsp;setAdjectiveDeclension(@Nullable
                                   <a href="../../../../com/kayon/core/adjective/AdjectiveDeclension.html" title="interface in com.kayon.core.adjective">AdjectiveDeclension</a>&nbsp;adjectiveDeclension)</pre>
            </li>
        </ul>
    </li>
</ul>

上面的源代码由 HTML 格式化程序提取、压缩和处理以便于阅读,here is the very raw complete file

您可以通过编写自定义 doclet 来自定义 javadoc 的格式。

请查看 javadoc 生成器文档中的此部分:

Javadoc Doclets

You can customize the content and format of the javadoc command output with doclets. The javadoc command has a default built-in doclet, called the standard doclet, that generates HTML-formatted API documentation. You can modify or make a subclass of the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you want.

When a custom doclet is not specified with the -doclet option, the javadoc command uses the default standard doclet. The javadoc command has several options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command-line options. See Options.

http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html