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 (注意有 ...
随机推荐
- flex渐变色制作圆角橙色按钮
<?xml version="1.0" encoding="utf-8"?> <s:SparkButtonSkin xmlns:fx=&quo ...
- Linux网络编程--多播
一.多播介绍 什么是多播? 单播用于两个主机之间的端对端通信,广播用于一个主机对整个局域网上所有主机上的数据通信.单播和广播是两个极端,要么对一个主机进行通信,要么对整个局域网上的主机进行通信.实际情 ...
- 系统中断与SA_RESTART
今天在调试程序时,sem_timedwait居然返回了一个Interrupted system call,错误码为EINTR.系统中断这东西我一向只闻其名,不见其"人",不想今天遇 ...
- 一个sigaction的C++ wrap
在上一篇文章(http://www.cnblogs.com/coding-my-life/p/4220128.html)中,提到了libev提供了处理信号的C++ wrap.但我显然接受不了需要进入l ...
- High bridge, low bridge(离散化, 前缀和)
High bridge, low bridge Q:There are one high bridge and one low bridge across the river. The river h ...
- html5lib-python doc
http://html5lib.readthedocs.org/en/latest/ By default, the document will be an xml.etree element ins ...
- IoC容器Autofac之实例优化(三)
回顾之前的代码 //这个类的作用是筛选出MPG类型的电影 public class MPGMovieLister { public Movie[] GetMPG() { var finder = Mo ...
- ionic 图片轮播问题
1.使用ion-slide可以实现图片轮播,但是如果在html中仅仅增加ion-slide是远远不够的,会出现两个问题: (注:使用的是angularjs.首先需要在,js文件中注入:$ionicSl ...
- Mysql 复制表结构 及其表的内容
顺便转一下Mysql复制表结构.表数据的方法: 1.复制表结构及数据到新表CREATE TABLE 新表 SELECT * FROM 旧表 这种方法会将oldtable中所有的内容都拷贝过来,当然我们 ...
- UIImage加载图片的区别和渲染模式
前言 关于本地图片UIImage的加载问题,还是需要注意的.不同的加载处理方式,在效率和性能上还是有差异的. 今天,我们来讲讲UIImage的加载应该选择什么样的API来加载! 两种API 这两种AP ...