• javadoc文档规范及API文档生成


    1、 javadoc 标签:

    标签 描述 示例
    @author 标识一个类的作者 @author description
    @deprecated 指名一个过期的类或成员 @deprecated description
    {@docRoot} 指明当前文档根目录的路径 Directory Path
    @exception 标志一个类抛出的异常 @exception exception-name explanation
    {@inheritDoc} 从直接父类继承的注释 Inherits a comment from the immediate surperclass.
    {@link} 插入一个到另一个主题的链接 {@link name text}
    {@linkplain} 插入一个到另一个主题的链接,但是该链接显示纯文本字体 Inserts an in-line link to another topic.
    @param 说明一个方法的参数 @param parameter-name explanation
    @return 说明返回值类型 @return explanation
    @see 指定一个到另一个主题的链接 @see anchor
    @serial 说明一个序列化属性 @serial description
    @serialData 说明通过writeObject( ) 和 writeExternal( )方法写的数据 @serialData description
    @serialField 说明一个ObjectStreamField组件 @serialField name type description
    @since 标记当引入一个特定的变化时 @since release
    @throws 和 @exception标签一样. The @throws tag has the same meaning as the @exception tag.
    {@value} 显示常量的值,该常量必须是static属性。 Displays the value of a constant, which must be a static field.
    @version 指定类的版本 @version info

    2、javadoc 使用详解

    https://blog.csdn.net/vbirdbest/article/details/80296136

    3、参考样例

    package java.rmi.server;

    import java.net.MalformedURLException;
    import java.net.URL;

    /**
    * <code>RMIClassLoaderSpi</code> is the service provider interface for
    * <code>RMIClassLoader</code>.
    *
    * In particular, an <code>RMIClassLoaderSpi</code> instance provides an
    * implementation of the following static methods of
    * <code>RMIClassLoader</code>:
    *
    * <ul>
    *
    * <li>{@link RMIClassLoader#loadClass(URL,String)}
    * <li>{@link RMIClassLoader#loadClass(String,String)}
    * <li>{@link RMIClassLoader#loadClass(String,String,ClassLoader)}
    * <li>{@link RMIClassLoader#loadProxyClass(String,String[],ClassLoader)}
    * <li>{@link RMIClassLoader#getClassLoader(String)}
    * <li>{@link RMIClassLoader#getClassAnnotation(Class)}
    *
    * </ul>
    *
    * When one of those methods is invoked, its behavior is to delegate
    * to a corresponding method on an instance of this class.
    * The details of how each method delegates to the provider instance is
    * described in the documentation for each particular method.
    * See the documentation for {@link RMIClassLoader} for a description
    * of how a provider instance is chosen.
    *
    * @author Peter Jones
    * @author Laird Dornin
    * @see RMIClassLoader
    * @since 1.4
    */
    public abstract class RMIClassLoaderSpi {

    /**
    * Provides the implementation for
    * {@link RMIClassLoader#loadClass(URL,String)},
    * {@link RMIClassLoader#loadClass(String,String)}, and
    * {@link RMIClassLoader#loadClass(String,String,ClassLoader)}.
    *
    * Loads a class from a codebase URL path, optionally using the
    * supplied loader.
    *
    * Typically, a provider implementation will attempt to
    * resolve the named class using the given <code>defaultLoader</code>,
    * if specified, before attempting to resolve the class from the
    * codebase URL path.
    *
    * <p>An implementation of this method must either return a class
    * with the given name or throw an exception.
    *
    * @param codebase the list of URLs (separated by spaces) to load
    * the class from, or <code>null</code>
    *
    * @param name the name of the class to load
    *
    * @param defaultLoader additional contextual class loader
    * to use, or <code>null</code>
    *
    * @return the <code>Class</code> object representing the loaded class
    *
    * @throws MalformedURLException if <code>codebase</code> is
    * non-<code>null</code> and contains an invalid URL, or
    * if <code>codebase</code> is <code>null</code> and a provider-specific
    * URL used to load classes is invalid
    *
    * @throws ClassNotFoundException if a definition for the class
    * could not be found at the specified location
    */
    public abstract Class<?> loadClass(String codebase, String name,
    ClassLoader defaultLoader)
    throws MalformedURLException, ClassNotFoundException;

    4、eclipse下项目生成API文档

    https://www.cnblogs.com/wdh1995/p/7705494.html

  • 相关阅读:
    Codeforces-541div2
    动态规划-线性dp-hdu-4055
    动态规划_线性dp
    动态规划_背包问题笔记
    codeforces-1111
    数论模板
    codeforces-1114F-线段树练习
    2-sat
    拓扑排序
    强连通分量
  • 原文地址:https://www.cnblogs.com/zhima/p/9994746.html
Copyright © 2020-2023  润新知