生成包时显示 Javadoc 警告
Javadoc warning being shown while generating the package
我正在处理一个项目的 javadoc,修复 Javadoc 显示的所有错误和警告。但是在修复了大部分错误和警告之后,由于某种原因我只能显示这个'不敢想象。
4 warnings
[WARNING] Javadoc Warnings
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:100: warning - Tag @see: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:140: warning - Tag @see: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:166: warning - Tag @link: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:140: warning - Tag @link: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[INFO] Building jar: C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\target\marmot-0.5.1-SNAPSHOT-javadoc.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.921 s
[INFO] Finished at: 2016-10-21T10:03:11-02:00
[INFO] Final Memory: 29M/412M
[INFO] ------------------------------------------------------------------------
问题是:这些参考文献与方法在同一个 class 上,甚至 Eclipse 在我开始编写参考文献时都建议它们,有人知道任何其他可以给我这个警告的东西吗?
这是显示警告的 javadoc:
/**
* Determines if there exists resource kit appropriate for the given resource supporting the given capabilities.
* @param repository The repository in which the resource resides.
* @param resource The resource for which a resource kit should be returned.
* @param capabilities The capabilities required for the resource kit.
* @return <code>true</code> if there exists a resource kit to handle the given resource with the given capabilities, if any, in relation to the resource.
* @see #getResourceKit(Repository, URFResource, Capability...)
*/
public boolean hasResourceKit(final Repository repository, final URFResource resource, final Capability... capabilities);
/**
* Retrieves a resource kit appropriate for the given resource statically if possible, without further resource lookup. This method locates a resource kit in
* the following priority:
* <p>
* The first resource kit supporting the resource content type determined by:
* </p>
* <ol>
* <li>The given content type, if any.</li>
* <li>The content determined if possible by {@link #getExtensionContentType(String)} from the resource URI extension.</li>
* <li>The resource description is retrieved as a last resort and the resource kit is determined by delegating to
* {@link #getResourceKit(Repository, URFResource, Capability...)}.</li>
* </ol>
* @param repository The repository in which the resource resides.
* @param resourceURI The URI of the resource in the given repository.
* @param contentType The type of content the resource contains, or <code>null</code> if unknown.
* @param capabilities The capabilities required for the resource kit.
* @return A resource kit to handle the given resource with the given capabilities, if any, in relation to the resource; or <code>null</code> if there is no
* registered resource kit with the given capabilities in relation to the resource.
* @throws ResourceIOException if an error occurred retrieving a description of the resource kit.
* @see #getResourceKit(Repository, URFResource, Capability...)
*/
public RK getResourceKit(final Repository repository, final URI resourceURI, final ContentType contentType, final Capability... capabilities)
throws ResourceIOException;
/**
* Retrieves a resource kit appropriate for a MIME content type. This method should only be used for special-purpose functionality; when accessing resources
* {@link #getResourceKit(Repository, URFResource, Capability...)} should normally be used instead.
* @param contentType The type of content the resource contains.
* @param capabilities The capabilities required for the resource kit.
* @return A resource kit with the requested capabilities to handle the given content type, or <code>null</code> if no appropriate resource kit is registered.
*/
public RK getResourceKit(final ContentType contentType, final Capability... capabilities);
这是上面 javadoc 中引用的方法,它来自同一个 class:
/**
* Retrieves a resource kit appropriate for the given resource. This method locates a resource kit in the following priority:
* <ol>
* <li>The first resource kit supporting the resource content type determined by {@link #determineContentType(URFResource)}.</li>
* <li>The first resource kit supporting one of the resource types.</li>
* <li>If the resource has a collection URI, the default collection resource kit.</li>
* <li>The default resource kit.</li>
* </ol>
* @param repository The repository in which the resource resides.
* @param resource The resource for which a resource kit should be returned.
* @param capabilities The capabilities required for the resource kit.
* @return A resource kit to handle the given resource with the given capabilities, if any, in relation to the resource; or <code>null</code> if there is no
* registered resource kit with the given capabilities in relation to the resource.
* @see #determineContentType(URFResource)
*/
public RK getResourceKit(final Repository repository, final URFResource resource, final Capability... capabilities);
由于项目是 public,这里有一个 link 用于修复 javadoc 的拉取请求:Bitbucket - Globalmentor's Project: MARMOT-5
你的问题实际上与Capability
是一个static inner class有关,在javadoc工具中有很多know issues with inner class是的,要解决此问题,您应该 为其添加外部前缀 class,在您的情况下为 ResourceKit
。
所以只需替换这个
@see #getResourceKit(Repository, URFResource, Capability...)
有了这个
@see #getResourceKit(Repository, URFResource, ResourceKit.Capability...)
还有这个
{@link #getResourceKit(Repository, URFResource, Capability...)}
有了这个
{@link #getResourceKit(Repository, URFResource, ResourceKit.Capability...)}
我正在处理一个项目的 javadoc,修复 Javadoc 显示的所有错误和警告。但是在修复了大部分错误和警告之后,由于某种原因我只能显示这个'不敢想象。
4 warnings
[WARNING] Javadoc Warnings
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:100: warning - Tag @see: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:140: warning - Tag @see: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:166: warning - Tag @link: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[WARNING] C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\src\main\java\com\globalmentor\marmot\MarmotSession.java:140: warning - Tag @link: can't find getResourceKit(Repository, URFResource, Capability...) in com.globalmentor.marmot.MarmotSession
[INFO] Building jar: C:\Users\magno\Documents\Globalmentor\Globalmentor's work\marmot\target\marmot-0.5.1-SNAPSHOT-javadoc.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.921 s
[INFO] Finished at: 2016-10-21T10:03:11-02:00
[INFO] Final Memory: 29M/412M
[INFO] ------------------------------------------------------------------------
问题是:这些参考文献与方法在同一个 class 上,甚至 Eclipse 在我开始编写参考文献时都建议它们,有人知道任何其他可以给我这个警告的东西吗?
这是显示警告的 javadoc:
/**
* Determines if there exists resource kit appropriate for the given resource supporting the given capabilities.
* @param repository The repository in which the resource resides.
* @param resource The resource for which a resource kit should be returned.
* @param capabilities The capabilities required for the resource kit.
* @return <code>true</code> if there exists a resource kit to handle the given resource with the given capabilities, if any, in relation to the resource.
* @see #getResourceKit(Repository, URFResource, Capability...)
*/
public boolean hasResourceKit(final Repository repository, final URFResource resource, final Capability... capabilities);
/**
* Retrieves a resource kit appropriate for the given resource statically if possible, without further resource lookup. This method locates a resource kit in
* the following priority:
* <p>
* The first resource kit supporting the resource content type determined by:
* </p>
* <ol>
* <li>The given content type, if any.</li>
* <li>The content determined if possible by {@link #getExtensionContentType(String)} from the resource URI extension.</li>
* <li>The resource description is retrieved as a last resort and the resource kit is determined by delegating to
* {@link #getResourceKit(Repository, URFResource, Capability...)}.</li>
* </ol>
* @param repository The repository in which the resource resides.
* @param resourceURI The URI of the resource in the given repository.
* @param contentType The type of content the resource contains, or <code>null</code> if unknown.
* @param capabilities The capabilities required for the resource kit.
* @return A resource kit to handle the given resource with the given capabilities, if any, in relation to the resource; or <code>null</code> if there is no
* registered resource kit with the given capabilities in relation to the resource.
* @throws ResourceIOException if an error occurred retrieving a description of the resource kit.
* @see #getResourceKit(Repository, URFResource, Capability...)
*/
public RK getResourceKit(final Repository repository, final URI resourceURI, final ContentType contentType, final Capability... capabilities)
throws ResourceIOException;
/**
* Retrieves a resource kit appropriate for a MIME content type. This method should only be used for special-purpose functionality; when accessing resources
* {@link #getResourceKit(Repository, URFResource, Capability...)} should normally be used instead.
* @param contentType The type of content the resource contains.
* @param capabilities The capabilities required for the resource kit.
* @return A resource kit with the requested capabilities to handle the given content type, or <code>null</code> if no appropriate resource kit is registered.
*/
public RK getResourceKit(final ContentType contentType, final Capability... capabilities);
这是上面 javadoc 中引用的方法,它来自同一个 class:
/**
* Retrieves a resource kit appropriate for the given resource. This method locates a resource kit in the following priority:
* <ol>
* <li>The first resource kit supporting the resource content type determined by {@link #determineContentType(URFResource)}.</li>
* <li>The first resource kit supporting one of the resource types.</li>
* <li>If the resource has a collection URI, the default collection resource kit.</li>
* <li>The default resource kit.</li>
* </ol>
* @param repository The repository in which the resource resides.
* @param resource The resource for which a resource kit should be returned.
* @param capabilities The capabilities required for the resource kit.
* @return A resource kit to handle the given resource with the given capabilities, if any, in relation to the resource; or <code>null</code> if there is no
* registered resource kit with the given capabilities in relation to the resource.
* @see #determineContentType(URFResource)
*/
public RK getResourceKit(final Repository repository, final URFResource resource, final Capability... capabilities);
由于项目是 public,这里有一个 link 用于修复 javadoc 的拉取请求:Bitbucket - Globalmentor's Project: MARMOT-5
你的问题实际上与Capability
是一个static inner class有关,在javadoc工具中有很多know issues with inner class是的,要解决此问题,您应该 为其添加外部前缀 class,在您的情况下为 ResourceKit
。
所以只需替换这个
@see #getResourceKit(Repository, URFResource, Capability...)
有了这个
@see #getResourceKit(Repository, URFResource, ResourceKit.Capability...)
还有这个
{@link #getResourceKit(Repository, URFResource, Capability...)}
有了这个
{@link #getResourceKit(Repository, URFResource, ResourceKit.Capability...)}