javadoc 生成帮助文档时,注意以下几点
参考: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 (<condition does not hold>)
- * 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 生成帮助文档时,注意以下几点的更多相关文章
- 用JavaDoc生成项目文档
项目到了尾声,大家都开始头疼——又要写文档了……是的,我们大多数人都不是从正规的Programer训练出来的.当初学习编程序的时候,就从来没有想过要给自己写的那几个程序编写一份完整的文档,所有的注释都 ...
- 如何在使用itext生成pdf文档时给文档添加背景图片
这个问题我在网上搜了很久,没有找到什么解决方案,需求其实很简单,就是添加背景图片.在解决这个问题之前,我们需要了解什么是背景图片?背景图片就是位于文档最底层的图片,文字和其他内容可以浮在它的上面.这又 ...
- C# 在根据窗体中的表格数据生成word文档时出错
出错内容为:
- WebService生成XML文档时出错。不应是类型XXXX。使用XmlInclude或SoapInclude属性静态指定非已知的类型。
情况是SingleRoom和DoubleRoom是Room类的子类.在WebService中有一个方法是返回Room类. public Room Get(int roomId) { return Ro ...
- 生成 XML 文档时出错。
找来找去,在CSDN 里看到高手解答了. 原来 WebService 传递参数时,不能使用 DataTable 如果需要使用DataTable 那就要用 DataSet 包装起来. 如果担心数据太 ...
- 使用Java生成word文档(附源码)
当我们使用Java生成word文档时,通常首先会想到iText和POI,这是因为我们习惯了使用这两种方法操作Excel,自然而然的也想使用这种生成word文档.但是当我们需要动态生成word时,通常不 ...
- eclipse中javadoc给项目生成api文档
步骤 1.打开java代码,编写JavaDoc 注释,只有按照java的规范编写注释,才能很好的生成API文档,javadoc注释与普通注释的区别为多一个*(星号).普通代码注释为/*XXX*/,而j ...
- eclipse如何为java项目生成API文档、JavaDoc
当我们的项目很大,编写了很多代码的时候,就需要生成一个标准的API文档,让后续的开发人员,或者合作者可以清晰的了解您方法的使用,那么如何将自己的项目生成API文档呢? 1.点击eclipse的[Pro ...
- 如何用JavaDoc命令生成帮助文档
如何用JavaDoc命令生成帮助文档 文档注释 在代码中使用文档注释的方法 /** *@author *@version * */ 生成帮助文档 打开java文件所在位置,在路径前加入cmd (注意有 ...
随机推荐
- hdu 1011 Starship Troopers_树状dp
题目链接 题意:给你一棵树(必须从根节点出发),每个节点上都有bug和value,你有m个骑士,每个骑士能消灭20个bug,你必须消灭该节点的全部bug才能拿到该节点的value,问最多能拿到valu ...
- 【HDU3371】Connect the Cities(MST基础题)
注意输入的数据分别是做什么的就好.还有,以下代码用C++交可以过,而且是500+ms,但是用g++就会TLE,很奇怪. #include <iostream> #include <c ...
- vim 的配色方案
浅色: http://www.vimninjas.com/2012/09/14/10-light-colors/ 深色: http://www.vimninjas.com/2012/08/26/10- ...
- DoTween学习笔记(二) UGUI结合使用(实现一些简单效果)
UGUI官方实例中是使用Animation来控制UI的移动,放大缩小动画等等, Animation来控制UI的动画工作量实在是太多了, 所以我们一般使用itween,DoTween. 来控制动画, 这 ...
- UITextField输入长度限制
[_yourTextField addTarget:self action:@selector(eventEditingChange:) forControlEvents:UIControlEvent ...
- kaggle之识别谷歌街景图片中的字母
https://github.com/lijingpeng/kaggle/tree/master/competitions/image_recognize 识别谷歌街景图片中的字母 street-vi ...
- ORACLE 视图的 with check option
ORACLE 视图的 with check option 我们来看下面的例子: create or replace view testview as select empno,ename from e ...
- 黑马程序员 ——Java SE(1)
----<a href="http://www.itheima.com" target="blank">Java培训.Android培训.iOS培训 ...
- MFC让控件随窗口大小而改变
转载自http://blog.csdn.net/chw1989/article/details/7488711 大小和位置都改变(亲测可行) 1.首先为窗体类添加CRect m_rect,该成员变量用 ...
- python调webservice和COM接口
调webservice # -*- coding: cp936 -*- from suds.client import Client url = 'http://192.168.50.165/port ...