参考:http://www.w3school.com.cn/tags/tag_pre.asp

javadoc 生成帮助文档时,注意以下几点:

1、函数功能描述的结尾一定要有句号,英文句号或中文句号均可。不然会有方法摘要里会出现后边一大片内容。

2、换行用<p>

3、<pre> 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。

public class JavadocDemo
{
  /**
   * 这个函数的功能是返回你输入的字符串.
   * <p>
   * 用法如下:
   * <blockquote>
   * <pre>
   * String str = func("this is a test");
   * System.out.println(str);
   * </pre></blockquote>
   * @param str 输入字符串.
   * @return 返回字符串
   */
  public static String func(String str)
  {
    return str;
  }
}

生成的帮助文档如下

参考

1、参考java源码的Object类wait()方法

    /**
* Causes the current thread to wait until another thread invokes the
* {@link java.lang.Object#notify()} method or the
* {@link java.lang.Object#notifyAll()} method for this object, or
* some other thread interrupts the current thread, or a certain
* amount of real time has elapsed.
* <p>
* This method is similar to the {@code wait} method of one
* argument, but it allows finer control over the amount of time to
* wait for a notification before giving up. The amount of real time,
* measured in nanoseconds, is given by:
* <blockquote>
* <pre>
* 1000000*timeout+nanos</pre></blockquote>
* <p>
* In all other respects, this method does the same thing as the
* method {@link #wait(long)} of one argument. In particular,
* {@code wait(0, 0)} means the same thing as {@code wait(0)}.
* <p>
* The current thread must own this object's monitor. The thread
* releases ownership of this monitor and waits until either of the
* following two conditions has occurred:
* <ul>
* <li>Another thread notifies threads waiting on this object's monitor
* to wake up either through a call to the {@code notify} method
* or the {@code notifyAll} method.
* <li>The timeout period, specified by {@code timeout}
* milliseconds plus {@code nanos} nanoseconds arguments, has
* elapsed.
* </ul>
* <p>
* The thread then waits until it can re-obtain ownership of the
* monitor and resumes execution.
* <p>
* As in the one argument version, interrupts and spurious wakeups are
* possible, and this method should always be used in a loop:
* <pre>
* synchronized (obj) {
* while (&lt;condition does not hold&gt;)
* obj.wait(timeout, nanos);
* ... // Perform action appropriate to condition
* }
* </pre>
* This method should only be called by a thread that is the owner
* of this object's monitor. See the {@code notify} method for a
* description of the ways in which a thread can become the owner of
* a monitor.
*
* @param timeout the maximum time to wait in milliseconds.
* @param nanos additional time, in nanoseconds range
* 0-999999.
* @throws IllegalArgumentException if the value of timeout is
* negative or the value of nanos is
* not in the range 0-999999.
* @throws IllegalMonitorStateException if the current thread is not
* the owner of this object's monitor.
* @throws InterruptedException if any thread interrupted the
* current thread before or while the current thread
* was waiting for a notification. The <i>interrupted
* status</i> of the current thread is cleared when
* this exception is thrown.
*/
public final void wait(long timeout, int nanos) throws InterruptedException {
if (timeout < 0) {
throw new IllegalArgumentException("timeout value is negative");
} if (nanos < 0 || nanos > 999999) {
throw new IllegalArgumentException(
"nanosecond timeout value out of range");
} if (nanos > 0) {
timeout++;
} wait(timeout);
}

2、>>Html标签定义<<

javadoc 生成帮助文档时,注意以下几点的更多相关文章

  1. 用JavaDoc生成项目文档

    项目到了尾声,大家都开始头疼——又要写文档了……是的,我们大多数人都不是从正规的Programer训练出来的.当初学习编程序的时候,就从来没有想过要给自己写的那几个程序编写一份完整的文档,所有的注释都 ...

  2. 如何在使用itext生成pdf文档时给文档添加背景图片

    这个问题我在网上搜了很久,没有找到什么解决方案,需求其实很简单,就是添加背景图片.在解决这个问题之前,我们需要了解什么是背景图片?背景图片就是位于文档最底层的图片,文字和其他内容可以浮在它的上面.这又 ...

  3. C# 在根据窗体中的表格数据生成word文档时出错

    出错内容为:

  4. WebService生成XML文档时出错。不应是类型XXXX。使用XmlInclude或SoapInclude属性静态指定非已知的类型。

    情况是SingleRoom和DoubleRoom是Room类的子类.在WebService中有一个方法是返回Room类. public Room Get(int roomId) { return Ro ...

  5. 生成 XML 文档时出错。

    找来找去,在CSDN 里看到高手解答了. 原来 WebService 传递参数时,不能使用 DataTable 如果需要使用DataTable  那就要用 DataSet  包装起来. 如果担心数据太 ...

  6. 使用Java生成word文档(附源码)

    当我们使用Java生成word文档时,通常首先会想到iText和POI,这是因为我们习惯了使用这两种方法操作Excel,自然而然的也想使用这种生成word文档.但是当我们需要动态生成word时,通常不 ...

  7. eclipse中javadoc给项目生成api文档

    步骤 1.打开java代码,编写JavaDoc 注释,只有按照java的规范编写注释,才能很好的生成API文档,javadoc注释与普通注释的区别为多一个*(星号).普通代码注释为/*XXX*/,而j ...

  8. eclipse如何为java项目生成API文档、JavaDoc

    当我们的项目很大,编写了很多代码的时候,就需要生成一个标准的API文档,让后续的开发人员,或者合作者可以清晰的了解您方法的使用,那么如何将自己的项目生成API文档呢? 1.点击eclipse的[Pro ...

  9. 如何用JavaDoc命令生成帮助文档

    如何用JavaDoc命令生成帮助文档 文档注释 在代码中使用文档注释的方法 /** *@author *@version * */ 生成帮助文档 打开java文件所在位置,在路径前加入cmd (注意有 ...

随机推荐

  1. CentOS6.4安装mplayer

    1.准备软件 mplayer官网:http://www.mplayerhq.hu/design7/news.html RPM Fusion网址:http://rpmfusion.org/ EPEL网址 ...

  2. ubuntu 16.04 一些使用过程中遇到的问题

    1  安装ssh 和 openssh-server之后通过SecureCRT 可以连接,FileZilla不能使用sftp方式进行连接, 安装vsftpd后测试ftp可以连接, 修改 /etc/ssh ...

  3. Hive 11、Hive嵌入Python

    Hive嵌入Python Python的输入输出都是\t为分隔符,否则会出错,python脚本输入print出规定格式的数据 用法为先add file,使用语法为TRANSFORM (name, it ...

  4. SqlServer经典函数之数字去零

    需求: 针对带有小数点的数字信息,去除小数点后多余的零 可能存在的情况: 1.精度范围内,出现多余的零    eg:1234.3400     想要的结果为1234.34 2.精度变大出现的多余的零, ...

  5. python爬爬(网友提供学习)

    import urllib2,urllib,os,re def ZZ(url): pathw=os.getcwd() #图片和标题目录 imagetitleregion=r'<div class ...

  6. 玩程序 之 一 . 字符串处理工具(可通过C#脚本扩展)

    平常喜欢写点小东西玩玩,既可以娱乐自己满足自己的虚荣心,又可以方便工作和学习,今天且拿出一个来,与大家一起分享!  1. 软件介绍 言归正传,先看看需求,有这样一串字符串 abc,def,ghi,jk ...

  7. python学习之路-11 多线程、多进程、协程

    python内置队列模块 queue queue的四种队列 q = queue.Queue() # 先进先出队列 q = queue.LifoQueue() # 后进先出队列 q = queue.Pr ...

  8. [跟我学Spring学习笔记][DI配置与使用]

    DI 依赖和依赖注入 定义 传统的依赖一般指"类之间的关系",那先让我们复习一下类之间的关系: 泛化:表示类与类之间的继承关系.接口与接口之间的继承关系: 实现:表示类对接口的实现 ...

  9. Android WebView 软键盘挡住输入框

    解决方法一: 在所在的Activity中加入 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RES ...

  10. Ubuntu自定义命令

    回到主文件夹 $ cd ~ 建立.bash_aliases $ touch .bash_aliases $ vim .bash_aliases 在此文件中加入一句话: alias cdlauncher ...