jdk/src/linux/doc/man/ja/javadoc.1
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
child 2692 345bc8d65b19
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
'\" t
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
.\" Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
.\" This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
.\" under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
.\" published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
.\" This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
.\" version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
.\" accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
.\" You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
.\" 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
.\" Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
.\" CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
.\" have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
.\" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
.TH javadoc 1 "2006 年 9 月 4 日" "Java SE 6" "ユーザーコマンド"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
.hw javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
.SH "名前"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
javadoc \- Java API ドキュメントジェネレータ
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
Java ソースファイルから、API ドキュメントの HTML ページを生成します。このドキュメントで紹介されている Javadoc の例は、Sun Solaris を使用した場合のものです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
.SH "形式"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
[
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
.I options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
] [
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
.I packagenames
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
] [
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
.I sourcefilenames
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
] [
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
.I \-subpackages pkg1:pkg2:...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
] [
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
.I @argfiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
引数を指定する順序は任意です。Javadoc ツールでの、処理対象の \f2.java\fP ファイルを決定する方法の詳細については、「ソースファイルの処理」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
.TP 15
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
.I options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
このドキュメントで指定されているコマンド行オプションです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
のオプションの一般的な使用法については、「使用例」を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
.I packagenames
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
.BR "java.lang java.lang.reflect java.awt" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
などの、スペースで区切られた
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
一連のパッケージ名です。ドキュメント化するパッケージごとに別個に
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
指定する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
ツールはこれらのパッケージ名を探すとき、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
.B \-sourcepath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
ツールは、サブパッケージを再帰的に処理することはありません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
アスタリスク (\f3*\f1) などのワイルドカードは使うことができません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
「1 つ以上のパッケージのドキュメント化」の
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
例を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
.I sourcefilenames
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
スペースで区切られた一連のファイル名です。パス、および
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
アスタリスク (\f3*\f1) などのワイルドカードを含めることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
ツールが処理するのは、ファイル名が「.java」という拡張子で終わり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
その拡張子を除いた名前が実際に有効なクラス名
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 (http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
「\f2Identifiers\fP」を参照) であるすべてのファイルです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
したがって、ハイフンを含む名前 (X-Buffer など) や、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
その他の無効な文字を含む名前を付けることによって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
それらのファイルをドキュメント化の対象から除外できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
これは、テスト用のファイルや、テンプレートから生成されたファイルの場合に便利です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
ツールは、ソースファイル名の前に指定されたパスを使用して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
ソースファイル名を探します。この場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
.B -sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
は使用しません。たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
.B Button.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
を渡すことは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
.BR ./Button.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
と指定することと同じです。完全パスを付けたソースファイル名の
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
例は「
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
.BR /home/src/java/awt/Graphics*.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
」のようになります。「1 つ以上のクラスのドキュメント化」の例を
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
参照してください。また、「パッケージとクラスのドキュメント化」の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
例のように、パッケージ名とソースファイル名を組み合わせることもできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
.I \-subpackages pkg1:pkg2:...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
指定されたパッケージ内のソースファイルからドキュメントを生成し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
再帰的にサブパッケージを処理します。 パッケージ名または
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
ソールファイル名を指定するための代替手段です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
.I @argfiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
Javadoc オプション、パッケージ名、およびソースファイル名を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
任意の順序で並べたリストが含まれる 1 つ以上のファイルです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
このファイルの中では、ワイルドカード (*) および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
.B \-J
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
オプションは指定できません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
.SH "機能説明"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
ツールは、一連の Java ソースファイルの宣言およびドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
コメントを解析し、デフォルトでは public クラスと protected クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
入れ子クラス(匿名の内部クラスを除く)、インタフェース、コンストラクタ、メソッド、および
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
フィールドについて説明した一連の HTML ページを生成します。また、API (アプリケーションプログラミングインタフェース) ドキュメントの生成や、一連のソースファイルの実装ドキュメントの生成に使用できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
ツールは、パッケージ全体、個々のソースファイル、またはその両方に対して
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
実行できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
ツールをパッケージ全体に対して実行する場合は、最上位ディレクトリから再帰的にたどるために -subpackages を使用するか、パッケージ名の明示的なリストを渡します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
個々のクラスに対して javadoc を実行する場合は、一連の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
ソース (\f3.java\f1) ファイル名を渡します。具体的な例は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
このページの最後で示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
次に、Javadoc によるソースファイルの処理について説明します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
ソースファイルの処理
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
Javadoc ツールは、末尾に \f2.java\fP の付いたファイル以外に、ソースファイルで説明する他のファイルも処理します。個々のソースファイル名を明示的に渡すことによって Javadoc ツールを実行する場合、\f2.java\fP ファイルを処理するかを正確に指定できます。ただし、多くの開発者はこの方法では作業しません。パッケージ名を渡すほうが簡単だからです。ソースファイル名を明示的に指定しなくても、Javadoc ツールは 3 つの方法で実行できます。この方法は、(1) パッケージ名を渡す、(2) \f2\-subpackages\fP を使用する、(3) ソースファイル名にワイルドカードを使用する (\f2*.java\fP) という方法です。これらの方法を使用する場合、Javadoc ツールは、\f2*.java\fP ファイルが次のすべての要件を満たしている場合にかぎり、このファイルを処理します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
名前から \f2.java\fP の接尾辞を取り除くと、実際に有効なクラス名になっている (有効な文字については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
「\f2Identifiers\fP」を参照)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
ソースツリーのルートから相対的なディレクトリパスが、区切り文字をドットに変換すると、実際に有効なパッケージ名になっている
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
パッケージ文には有効なパッケージ名が含まれる (前項目で指定)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
\f3リンクの処理\fP \- 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
実行時に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
ツールはその実行の一部として記述されているパッケージ、クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
およびメンバの名称にクロスリファレンスリンクを自動的に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
追加します。リンクは、次の箇所に現われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
宣言 (戻り値の型、引数の型、フィールドの型)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
@see タグから生成される [関連項目] のセクション
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
{@link} タグから生成されるインラインテキスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
@throws タグから生成される例外の名称
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
インタフェースのメンバに対する [定義] リンクと、クラスのメンバに対する [オーバーライド] リンク
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
パッケージ、クラス、およびメンバを記述した一覧表
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
パッケージとクラスの継承ツリー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
索引
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
\-link と \-linkoffline オプションを使用して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
コマンド行に含まれていない、個別に生成されるクラスの既存のテキストに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
ハイパーリンクを追加できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
\f3その他の処理についての詳細\fP \- 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
javadoc ツールは、実行のたびにひとつの完全なドキュメントを生成します。javadoc は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
追加生成を行えません。つまり、以前に実行した javadoc の結果を変更したり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
それらを直接取り込むことはできません。しかし、前述のようにほかの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
実行の結果にリンクすることは可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
実装上の理由から、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
ツールは実行に java コンパイラを必要とし、java コンパイラに依存しています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
ツールは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
.B javac 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
の一部を呼び出して、宣言をコンパイルし、メンバの実装は無視します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
ツールは、クラス階層を含むクラスの豊富な内部表現、および「使用」関係を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
構築し、そこから HTML を生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
ツールは、ソースコードのドキュメンテーションコメントから、ユーザの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
提供するドキュメントも取得します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
ツールは、メソッド本体のない純粋なスタブファイルである 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
.B .java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
ソースファイル上で実行されます。つまり、API の作成時には、コードを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
記述する前の設計の早い段階でドキュメンテーションコメントを記述し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
を実行できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
コンパイラに依存することによって、HTML 出力が、実際の実装に正確に対応
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
することが保証されます。実際の実装は、明示的でなく暗黙的に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
ソースコードに依存している場合があります。たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
.B .class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
ファイル内には存在するが、ソースコード内には存在しない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
デフォルトコンストラクタ (「Java Language Specification」のセクション 8.6.7: http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#36154) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
をドキュメント化します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
.LP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
多くの場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
ツールでは、ソースファイルのコードが不完全またはエラーを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
含んでいる場合でもドキュメントを生成できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
このため、デバッグやトラブルシューティングが完了する前に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
ドキュメントを生成できます。 たとえば、Java 言語仕様によると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
抽象メソッドを含むクラスはそれ自体を抽象と宣言しなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
このエラーを検出すると、javac コンパイラの場合は、このエラーで
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
停止しますが、javadoc ツールは警告を出さずに処理を進めます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
javadoc ツールはドキュメンテーションコメントの基本的なチェックを行います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
ドキュメンテーションコメントをより詳しくチェックする必要がある場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
DocCheck ドックレットを使用してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
.LP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
ツールがドキュメント用の内部構造を構築するときは、参照する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
クラスをすべてロードします。このため、ブートストラップクラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
拡張機能、またはユーザクラスにかかわらず、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
ツールは、参照するクラスをすべて検出できなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
一般的に、作成する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
クラスは、拡張機能としてロードされるか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
.BR javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
ツールのクラスパス内にある必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
.SS "Javadoc ドックレット"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
.B  javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
ツールの出力の内容と形式は、ドックレットを使ってカスタマイズできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
.B  javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
ツールには、標準ドックレットと呼ばれるデフォルトの「組み込み型」
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
ドックレットがあり、これによって HTML 形式の API
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
ドキュメントを生成します。標準ドックレット
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
の修正やサブクラス化を行なったり、HTML、XML、MIF、RTF などの好みの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
出力形式を生成する独自のドックレットを記述することも可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
ドックレットとその使用法については、次を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
ドックレット 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
.B -doclet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
コマンド行オプション 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
.B -doclet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
コマンド行オプションでカスタムドックレットが指定されていない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
ツールは、デフォルトの標準ドックレットを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
ツールには、どのドックレットが使われているかには関係なく使用できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
コマンド行オプションがあります。標準ドックレットでは、これらの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
ほかに、いくつかのコマンド行オプションが追加されます。どちらの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
オプションについても、後述の「オプション」で説明します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
.SS 関連ドキュメントおよびドックレット
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
Javadoc に施された機能強化 - Javadoc に追加された改良点の詳細 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
Javadoc FAQ - 頻繁に寄せられる質問に対する回答、Javadoc 関連のツールについての情報、およびバグの回避方法 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
Javadoc のドキュメンテーションを作成するには - Sun で
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
一般的なドキュメンテーションコメントの記述方法の詳細 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
API 仕様を記述するための要件 - Java 2 プラットフォーム仕様を記述する際に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
使用された標準要件。 この情報は、ソースファイルのドキュメンテーションコメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
形式で API 仕様を記述する場合にも、その他の形式で記述する場合にも
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
役立ちます。 検証可能なアサーションを満たすパッケージ、クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
インタフェース、フィールド、およびメソッドについての要件を定めています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
ドキュメンテーションコメントの仕様 - ドキュメンテーションコメントの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
オリジナル仕様については、『Java Language Specification』 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
(James Gosling、Bill Joy、Guy Steele 共著) の初版の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
第 18 章「Documentation Comments」を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
この章は、第 2 版では削除されました。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
DocCheck ドックレット - ソースファイル内のドキュメンテーションコメントを検査し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
見つかったエラーや不規則な箇所を一覧にしたレポートを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
これは Sun Doc チェックユーティリティの一部です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
MIF ドックレット - MIF、FrameMaker、および PDF 形式での API ドキュメントの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
生成を自動化します。 MIF は Adobe FrameMaker の互換形式です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
.SS "用語"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
「\f2ドキュメンテーションコメント\fP」、「\f2doc コメント\fP」、「\f2主説明\fP」、「\f2タグ\fP」、「\f2ブロックタグ\fP」、および「\f2インラインタグ\fP」の用語については、「ドキュメンテーションコメント」で説明します。以下のその他の用語は、Javadoc ツールのコンテキストで特定の意味を持ちます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
生成されるドキュメント 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
ツールが Java ソースコード内の doc コメントから生成したドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
のことです。デフォルトの生成ドキュメントは HTML 形式で、標準
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
ドックレットによって作成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
名前
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
Java 言語での名前、つまりパッケージ、クラス、インタフェース、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
フィールド、コンストラクタ、またはメソッドの名前のことです。名前は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
.BR java.lang.String.equals(java.lang.Object) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
のように完全修飾することも、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
.BR equals(Object) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
のように部分修飾することもできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
ドキュメント化されるクラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
の実行によって完全なドキュメントが生成されるクラスと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
インタフェースです。ドキュメント化するには、ソースファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
使用可能でなければならず、ソースファイル名またはパッケージ名の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
どちらかを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
コマンドに渡さなければなりません。ドキュメント化されるクラスは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
の実行で組み込まれるクラス、つまり「組み込みクラス」とも呼ばれます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
含まれるクラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
対応するソースファイル名またはパッケージ名が javadoc コマンドに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
渡されるクラスおよびインタフェースのことです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
除外されるクラス
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
javadoc コマンドにソースファイル名またはパッケージ名が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
渡されないクラスとインタフェースです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
参照クラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
ドキュメント化されるクラスとインタフェースの定義 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
(実装) またはドキュメンテーションコメント内で明示的に参照される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
クラスとインタフェースです。参照の例としては、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
戻り値の型、パラメータの型、キャストの型、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
拡張されるクラス、実装されるインタフェース、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
インポートされるクラス、メソッド本体で使用される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
クラス、@see、{@link}、{@linkplain}、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
および {@inheritDoc} タグなどがあります 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
(この定義は 1.3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
(http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javadoc.html#referencedclasses)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
から
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
変更されていることに注意)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
javadoc ツールは動作中、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
のブートクラスパスと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
クラスパス内にある参照されているクラスを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
すべてメモリにロードするためです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
参照されているクラスが見つからなかった
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
場合は、[クラスが見つかりません] という警告が表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
ツールは、クラスの存在とそのメンバの完全修飾名を決定するのに十分な情報を、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
.B .class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
ファイルから引き出すことができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
外部参照クラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
参照されるクラスのうち、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
を実行してもドキュメントが生成されないクラスです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
つまり、これらのクラスは、コマンド行で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
ツールに渡されていません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
生成ドキュメント内でこれらのクラスにリンクしている箇所は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
「外部参照」または「外部リンク」と呼ばれます。 たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
.B java.awt 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
パッケージに対してだけ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
を実行した場合、Object などの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
.BR java.lang 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
内のすべてのクラスは、外部参照クラスになります。外部参照クラスには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
.B \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
および
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
オプションを使ってリンクすることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
外部参照クラスには、通常そのソースコメントを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
.B \javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
ツールの実行で利用できないという重要な特徴があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
この場合、それらのコメントを継承することはできません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
.SH  "ソースファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
ツールは、クラスの Java 言語ソースファイル (\f3.java\f1)、パッケージコメントファイル、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
概要コメントファイル、およびその他の処理されないファイルの 4 種類の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
「ソース」ファイルを基にして、出力を生成します。また、ドキュメント化しないがソースツリーに存在する場合があるテストファイルやテンプレートについても説明します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
.SS "クラスソースコードファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
各クラスまたはインタフェース、およびそのメンバは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
.B .java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
ファイルの中にそれ自身のドキュメンテーションコメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
持つことができます。ドキュメンテーションコメントの詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
「ドキュメンテーションコメント」の節を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
.SS "パッケージコメントファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
各パッケージは、独自のドキュメンテーションコメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
持つことができ、「ソース」ファイルに保持します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
ツールは、生成するパッケージの要約ページにこのコメントをマージします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
通常、このコメントには、パッケージ全体に適用される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
ドキュメントを含めます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
パッケージコメントファイルを作成する場合、コメントの格納先として、次の 2 つのファイルのいずれかを選択できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
\f2package\-info.java\fP \- パッケージ宣言、パッケージ注釈、パッケージコメント、および Javadoc タグを格納できます。このファイルは JDK 5.0 で導入されたものであり、package.html よりも推奨されています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
\f2package.html\fP \- 格納できるのはパッケージコメントと Javadoc タグだけです。パッケージ注釈は格納できません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
各パッケージは、単一の \f2package.html\fP ファイル、単一の \f2package\-info.java\fP ファイルのいずれかを持つことができますが、両方を持つことはできません。このどちらかのファイルを \f2.java\fP ファイルとともに、ソースツリー内のそのパッケージのディレクトリ内に配置してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
\f4package\-info.java\fP このファイルには、次の構造のパッケージコメントを格納できます。コメントはパッケージ宣言の前に配置します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
File: \f2java/applet/package\-info.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
 * Provides the classes necessary to create an  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
 * applet and the classes an applet uses 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
 * to communicate with its applet context.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
 * The applet framework involves two entities:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
 * the applet and the applet context.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
 * An applet is an embeddable window (see the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
 * {@link java.awt.Panel} class) with a few extra
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
 * methods that the applet context can use to 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
 * initialize, start, and stop the applet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
 * @since 1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
 * @see java.awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
package java.lang.applet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
コメント区切り文字の \f2/**\fP と \f2*/\fP は記述する必要がありますが、中間行の行頭のアスタリスクは省略してもかまいません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
\f4package.html\fP \- このファイルには、次の構造のパッケージコメントを格納できます。コメントは \f2<body>\fP 要素内に配置します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
File: \f2java/applet/package.html\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
<HTML>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
<BODY>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
Provides the classes necessary to create an applet and the 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
classes an applet uses to communicate with its applet context.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
The applet framework involves two entities: the applet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
and the applet context. An applet is an embeddable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
window (see the {@link java.awt.Panel} class) with a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
few extra methods that the applet context can use to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
initialize, start, and stop the applet. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
@since 1.0 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
@see java.awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
</BODY>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
</HTML>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
これは単なる通常の HTML ファイルであり、パッケージ宣言を含んでいない点に注意してください。パッケージコメントファイルの内容は、ほかのすべてのコメントと同様に HTML で記述されています。ただし、ほかのコメントと異なる点が 1 つだけあります。それは、このドキュメンテーションコメントには、コメント区切り文字である \f2/**\fP と \f2*/\fP、および行頭のアスタリスクを含めてはならない、ということです。コメントを書く場合は、最初の文をパッケージの概要とし、\f2<body>\fP と最初の文の間にタイトルやその他のテキストを含めないようにします。パッケージタグを含めることはできますが、ほかのドキュメンテーションコメントと同様、全てのブロックタグは説明のあとに置かなければなりません。パッケージコメントファイルに \f2@see\fP タグを追加する場合は、完全指定の名前を使用する必要があります。詳細は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#packagecomments
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
「\f2example of \fP\f2package.html\fP」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
\f3パッケージコメントファイルの処理\fP \- Javadoc ツールは、実行時にパッケージコメントファイルを自動的に検索し、このファイルを見つけると次の処理を行います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
処理できるようにコメントをコピーする (\f2package.html\fP の場合であれば、\f2<body>\fP と \f2</body>\fP HTML タグの間にある内容をすべてコピーする。\f2<head>\fP を含め、そこに \f2<title>\fP やソースファイルの著作権記述などの情報を配置することもできるが、生成後のドキュメンテーションにはそれらは一切表示されない) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
パッケージタグがあれば、すべて処理する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
生成したパッケージの概要ページの最後に、処理したテキストを挿入する (例: パッケージの概要)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
パッケージの概要ページの先頭に、パッケージコメントの最初の文をコピーする。さらに、概要ページのパッケージリストに、パッケージ名とパッケージコメントの最初の文を追加する (例: 概要の要約)。文の末尾は、クラスやメンバの主説明の最初の文の末尾と同じ規則によって判断される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
.SS "概要コメントファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
ドキュメント化する各アプリケーションまたはパッケージのセットは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
独自の概要ドキュメンテーションコメントを持つことができ、それは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
「ソース」ファイルに保持されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
ツールは、生成する概要ページにこのコメントをマージします。通常、この
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
コメントには、アプリケーションまたはパッケージのセット全体に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
当てはまるドキュメントを含めます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
概要コメントファイルを作成する場合、ファイルに好きな名前を付けて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
好きな場所に置くことができますが、通常はファイル名を 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
.B overview.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
にして、ソースツリーの一番上の階層に置きます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
.B java.applet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
パッケージのソースファイルが 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
.B /home/user/src/java/applet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
ディレクトリに含まれているとすると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
.BR /home/user/src/overview.html 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
に概要コメントファイルを作成することができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
異なるパッケージのセットに対して javadoc を複数回実行する場合は、同じ 1 つのソースファイルのセットに対して複数の概要コメントファイルを作成できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
たとえば、内部ドキュメンテーション用に \-private を指定して javadoc を 1 回実行したあと、公開ドキュメンテーション用にそのオプションを指定しないで再度実行することができます。この場合、各概要コメントファイルの 1 文目で、そのドキュメンテーションを公開用または内部用として記述できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
概要コメントファイルの内容は、前に述べたパッケージコメントファイルと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
同様、HTML で記述された 1 つの大きなドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
コメントです。詳細は、前述の説明を参照してください。繰り返しに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
なりますが、このコメントを書く場合は、最初の文をアプリケーション
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
またはパッケージのセットの要約にし、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
.B <body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
と最初の文の間にタイトルまたはその他のテキストを含めてはなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
概要タグを含めることができます。どのドキュメンテーションコメントに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
ついても、{\f3@link\f1}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
以外のタグは、説明のあとに置く必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
タグを追加する場合は、完全指定の名前を使用する必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
.BR javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
ツールの実行時に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
.B \-overview
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
オプションを使って概要コメントファイル名を指定します。ファイルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
パッケージコメントファイルと同じように処理されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
.B <body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
タグと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
.B </body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
タグとの間にあるすべての内容を処理のためにコピーする 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
存在する概要タグを処理する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
概要の要約などの Javadoc が生成する概要ページの最後に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
処理されたテキストを挿入する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
概要ページの先頭に、概要コメントの最初の文をコピーする 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
.SS "その他の処理されないファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
ソースには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
ツールで生成先のディレクトリにコピーする、その他の任意のファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
含めることができます。一般に、このようなファイルには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
サンプルのグラフィックファイル、Java ソース 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
(\f3.java\f1) およびクラス (\f3.class\f1) ファイル、内容が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
通常の Java ソース
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
ファイルのドキュメンテーションコメントの影響を受けない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
独立した HTML ファイルなどがあります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
処理されないファイルを含めるには、それらのファイルを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
.BR doc-files 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
というディレクトリに置きます。このディレクトリは、任意のパッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
ディレクトリの下に作成できます。パッケージごとにこのようなサブ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
ディレクトリを 1 つ持つことができます。このサブディレクトリには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
イメージ、サンプルコード、ソースファイル、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
.B .class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
ファイル、アプレット、および HTML ファイルを入れることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
たとえば、ボタンの画像 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
.B button.gif 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
.B java.awt.Button 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
クラスドキュメントに含めたい場合は、そのファイルを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
.B /home/user/src/java/awt/doc-files/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
ディレクトリに置きます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
.BR doc-files 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
ディレクトリを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
.B /home/user/src/java/doc-files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
に置くことはできません。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
.B java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
はパッケージではなく、そのディレクトリそのものにソースファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
入っていないからです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
これらの処理されないファイルへのリンクは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
すべて明示的に記述する必要があります。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
ツールがファイルを見ずに、単にディレクトリとその内容物を生成先に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
コピーするだけだからです。たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
.B Button.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
ドキュメンテーションコメント内のリンクは、次のようになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
* This button looks like this:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
* <img src="doc-files/Button.gif">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
.SH "テストファイルおよびテンプレートファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
一部の開発者から、テストファイルおよびテンプレートファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
対応するソースファイルの近くのソースツリーに保存したいという要望がありました。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
つまり、これらのソースファイルと同じディレクトリまたはサブディレクトリに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
保存したいということです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
個別のソースファイル名で明示的に渡して 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
ツールを実行する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
テストファイルおよびテンプレートファイルを意図的に除外して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
処理されないようにすることができます。ただし、パッケージ名または
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
ワイルドカードで渡す場合は、以下のルールに従って、これらのテストファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
およびテンプレートファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
処理されないようにする必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
テストファイルとテンプレートファイルの違いは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
テストファイルは、正当でコンパイル可能なソースファイルであるのに対して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
テンプレートファイルは、そうではないという点です。ただし、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
テンプレートファイルも「.java」で終わることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
テストファイル \-
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
開発者の多くは、あるパッケージのコンパイル可能で実行可能な
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
テストファイルをそのパッケージのソースファイルと同じ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
ディレクトリに配置したいと考えています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
しかしテストファイルは、名前なしパッケージなど、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
ソースファイルパッケージとは別のパッケージに属させたいとも
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
考えています (そのため、テストファイルには package ステートメントがないか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
またはソースとは別の package ステートメントがあります)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
このような状況では、コマンド行で指定されているソースのパッケージ名を指定して
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
そのソースがドキュメント化されているときに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
テストファイルは警告またはエラーを引き起こします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
そのようなテストファイルはサブディレクトリに配置する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
たとえばソースファイルのテストファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
.B com.package1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
に追加する場合は、それらのテストファイルを、ハイフンが含まれるため
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
パッケージ名としては無効になる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
サブディレクトリに配置します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
com/package1/test-files/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
こうすると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
ツールでは警告なしで
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
test ディレクトリをスキップします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
テストファイルに doc コメントが含まれる場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
次のようにワイルドカードを含んだテストソースファイル名で渡して
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
テストファイルのドキュメントを生成するように、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
ツールを別個に実行できるように設定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
\f2com/package1/test\-files/*.java\fP.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
ソースファイルのテンプレート\-
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
テンプレートファイルの名前は「.java」で終わることもありますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
テンプレートファイルはコンパイルできません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
ソースディレクトリに保持したいソースファイルの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
テンプレートがある場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
このファイル名にハイフン (Buffer-Template.java など) や
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
その他の不正な Java 文字を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
こうすることで、処理されないようになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
ツールが処理するのは、「.java」接尾辞を除いた名前が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
正規のクラス名であるソースファイルだけであるためです (「識別子」http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625 参照)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
.SS  "生成されるファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
デフォルトでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
は、HTML 形式のドキュメントを生成する標準ドックレットを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
使います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
このドックレットは、以下の種類のファイルを生成します。以下の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
各 HTML「ページ」は、それぞれ別のファイルに対応します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
が生成するファイルの名前には、クラスやインタフェースの名前に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
ちなんだものと、そうでないもの (\f3package-summary.html\f1 など) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
の 2 種類があります。後者のグループには、前者のグループの名前と
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
ファイル名が競合しないように、ハイフンが含まれています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
.SS "基本内容ページ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
ドキュメント化する各クラスまたは各インタフェースに対し、1 つのクラス
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
ページまたはインタフェースページ (\f3classname.html\f1) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
ドキュメント化する各パッケージに対し、1 つのパッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
ページ (\f3package-summary.html\f1)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
ツールによって、ソースツリーのパッケージディレクトリ内の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
.B package.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
または
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
package\-info.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
というファイル内のすべての HTML テキストが含められる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
パッケージのセット全体に対して 1 つの概要
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
ページ (\f3overview-summary.html\f1)。これは、生成される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
ドキュメントの先頭ページになる。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
ツールによって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
.B -overview
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
オプションで指定されたファイル内のすべての HTML テキストが含められる。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
このファイルが作成されるのは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
に 2 つ以上のパッケージ名を渡した
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
場合だけであることに注意する。詳細は、以下の「HTML フレーム」節を参照
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
.SS "相互参照ページ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
パッケージのセット全体に対して 1 つのクラス階層ページ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
(\f3overview-tree.html\f1)。これを表示するには、ナビゲーション
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
バーの [概要] をクリックしてから、[階層ツリー] をクリックする 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
各パッケージに対して 1 つのクラス階層
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
ページ (\f3package-tree.html\f1)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
特定のパッケージページ、クラスページ、またはインタフェースページを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
表示し、[階層ツリー] をクリックすると、そのパッケージの階層が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
表示される 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
各パッケージに対して 1 つの [使用] 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
ページ (\f3package-use.html\f1)と、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
各クラスおよびインタフェースに対して別に 1 つの [使用]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
ページ(\f3class-use/classname.html\f1)。このページは、特定のクラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
インタフェース、またはパッケージのなんらかの部分を使っている
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
パッケージ、クラス、メソッド、コンストラクタ、およびフィールドを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
記述する。クラスまたはインタフェース A について考えると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
その[使用] ページには、A のサブクラス、A として宣言された
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
フィールド、A を返すメソッド、A 型のパラメータを持つメソッド
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
およびコンストラクタが表示される。このページには、パッケージ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
クラス、またはインタフェースに移動してから、ナビゲーションバー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
の [使用] リンクをクリックすることによってアクセスできる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
非推奨 API ページ (\f3deprecated-list.html\f1)。推奨されない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
名前すべての一覧が含まれている (非推奨名は、通常は改良された API が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
存在するために使用が推奨されていない API の名前で、たいていはそれに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
置き換わる名前が提示されている。非推奨 API は、将来の実装では
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
削除される可能性がある) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
定数フィールド値ページ (\f3constant-values.html\f1) 。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
static フィールドの値が表示される。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
直列化形式ページ (\f3serialized-form.html\f1)。直列化可能クラス
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
および外部化可能クラスの情報用。これらの各クラスには、直列化
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
フィールドおよびメソッドに関する説明がある。これらの情報は、API を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
使う開発者ではなく、再実装者に必要な情報である。ナビゲーションバーに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
リンクがない場合、任意の直列化されたクラスに移動して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
クラスの [関連項目] セクション内の [直列化された形式] をクリック
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
するとこの情報を取得できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
標準ドックレットは、直列化された形式のページを自動的に生成する。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
ここには、Serializable を実装する public または非 public の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
クラスが組み込まれており、さらに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
.B readObject 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
メソッド、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
.B writeObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
メソッド、直列化されたフィールド、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
および @serial タグ、@serialField タグ、@serialData タグからの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
ドキュメンテーションコメントが組み込まれている。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
直列化が可能な public クラスを除外するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
そのクラスまたはそのクラスが属するパッケージを @serial exclude タグで
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
指定する。直列化が可能な package private クラスを含めるには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
そのクラスまたはそのクラスが属するパッケージを @serial include タグで
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
指定する。 1.4 では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
\-private 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
オプションを指定せずに javadoc を実行することで、public クラスおよび 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
private クラスに完全な直列化形式を生成することができる。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
索引 (\f3index-*.html\f1)。すべてのクラス名、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
インタフェース名、コンストラクタ名、フィールド名、およびメソッド名を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
アルファベット順に並べてある。索引は、Unicode を扱えるように
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
国際化されており、1 つのファイルとして生成するか、または先頭
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
文字 (英語の場合 A から Z) ごとに別のファイルとして生成できる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
.SS "サポートファイル"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
ヘルプページ (\f3help-doc.html\f1)。ナビゲーションバーおよび
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
上記のページについて説明する。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
.BR \-helpfile 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
を使って、デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
ヘルプファイルに置き換わる独自のカスタムヘルプファイルを提供する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
こともできる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
1 つの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
.B index.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
ファイル。表示用 の HTML フレームを作成する。このファイルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
フレーム付きの最初のページを表示する場合にロードする。このファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
自体は、テキスト内容を含まない 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
複数のフレームファイル (\f3*-frame.html\f1)。パッケージ、クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
およびインタフェースの一覧を含む。HTML フレームを表示するときに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
使われる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
パッケージリストファイル (\f3package-list\f1)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
.B \-link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
オプションおよび 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
.B \-linkoffline
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
オプションで使われる。これは、HTML ファイルではなくテキストファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
のため、リンクではアクセスできない 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
スタイルシートファイル (\f3stylesheet.css\f1)。生成されるページ上に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
表示される限られた色数、フォントファミリ、フォントサイズ、フォントの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
スタイルおよび配置を制御する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
コピー先ディレクトリにコピーしたいファイル (イメージ、サンプル、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
ソースファイルなど) が入っている doc ファイルのディレクトリ。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
ツールはこのようなファイルを処理しない。つまり、このようなファイル内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
タグはすべて無視される。ソースツリーに存在しない限り、この
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
ディレクトリは生成されない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
.SS "HTML フレーム"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
ツールは、下の図に示すように、2 つか 3 つの HTML フレームを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
1 つのパッケージしかない場合 (またはパッケージがない場合) は、パッケージの一覧を省略することによって最低限必要な数のフレームを作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
ソースファイル (*\f3.java\f1) または単一のパッケージ名を引数として
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
コマンドに渡す場合は、左側の列にクラスの一覧を表示する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
フレーム (C) 1 つだけが作成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
に複数のパッケージ名を渡す場合は、概要ページ (Detail) に加えて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
すべてのパッケージの一覧を表示する第 3 のフレーム (P) が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
作成されます。この概要ページのファイル名は
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
.BR overview-summary.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
です。したがって、このファイルが作成されるのは、2 つ以上のパッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
名を渡した場合だけです。[フレームなし] リンクをクリックするか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
.BR overview-summary.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
から表示するようにすると、フレームを省略できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
HTML フレームに慣れていない場合は、フレームには、印刷および
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
スクロール用の「フォーカス」が必要であることに注意する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
必要があります。フレームにフォーカスを与えるには、そのフレームを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
クリックします。すると、多くのブラウザでは、矢印キーおよびページキー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
を使ってそのフレームをスクロールしたり、[印刷] メニュー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
コマンドを使ってそのフレームを印刷したりできるようになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
    ------------                ------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
    |C| Detail |                |P| Detail |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
    | |        |                | |        |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
    | |        |                |-|        |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
    | |        |                |C|        |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
    | |        |                | |        |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
    | |        |                | |        |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
    ------------                ------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
   javadoc *.java           javadoc java.lang java.awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
HTML フレームが必要かどうかによって、次のどちらかのファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
開始ページとしてロードします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
.B index.html 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
(フレームあり) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
.B overview-summary.html 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
(フレームなし) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
.SS "生成されるファイル構造"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
生成されるクラスファイルおよびインタフェースファイルは、Java ソース
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
ファイルおよびクラスファイルと同じディレクトリ階層で組織
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
されます。この構造は、1 つのサブパッケージにつき 1 つのディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
で構成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
.B java.applet.Applet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
クラスに対して生成されるドキュメントは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
.BR java/applet/Applet.html 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
に格納されます。生成先のディレクトリの名前が apidocs だと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
すると、java.applet パッケージのファイル構造もこれに従います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
前述したように、「frame」という語を名前に含むファイルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
すべて左上または左下のフレームに表示されます。それ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
以外の HTML ファイルは、すべて右側のフレームに表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
注: ディレクトリは、太字 (bold) で示してあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
アスタリスク (*) は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
への引数がパッケージ名でなくソースファイル名 (*\f3.java\f1) の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
ときに、省略されるファイルおよびディレクトリを示しています。また、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
引数がソースファイル名のときには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
は作成されますが、空です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
.B doc-files 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
ディレクトリは、ソースツリー内に存在しない限り、生成先に表示されません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
\fP\f3apidocs\fP                             最上位ディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
   index.html                       HTML フレームを設定する初期ページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
 * overview\-summary.html            全パッケージのリスト。先頭に要約文がある
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
   overview\-tree.html               全パッケージのクラス階層のリスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
   deprecated\-list.html             全パッケージの推奨されない API のリスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
   constant\-values.html             全パッケージの static フィールドの値のリスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
   serialized\-form.html             全パッケージの直列化された形式のリスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
 * overview\-frame.html              全パッケージのリスト。左上のフレームに表示される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
   allclasses\-frame.html            全パッケージの全クラスのリスト。左下のフレームに表示される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
   help\-doc.html                    これらのページの構成を示すユーザヘルプを表示する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
   index\-all.html                   \-splitindex オプションなしで作成されたデフォルト索引
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
   \f3index\-files\fP                      \-splitindex オプションを指定して作成されたディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
       index\-<number>.html          \-splitindex オプションを指定して作成された索引ファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
   package\-list                     パッケージ名のリスト。外部参照を解決するためだけに使用される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
   stylesheet.css                   フォント、色、配置を定義する HTML スタイルシート
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
   \f3java\fP                             パッケージディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
       \f3applet\fP                       サブパッケージディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   970
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
            Applet.html             Applet クラスのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
            AppletContext.html      AppletContext インタフェースのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
            AppletStub.html         AppletStub インタフェースのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
            AudioClip.html          AudioClip インタフェースのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
          * package\-summary.html    このパッケージのクラスのリスト。先頭に要約文がある
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
          * package\-frame.html      このパッケージのクラスのリスト。左下のフレームに表示される
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
          * package\-tree.html       このパッケージのクラス階層のリスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
            package\-use             このパッケージが使用されている場所のリスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
            \f3doc\-files\fP               イメージやサンプルのファイルが格納されるディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
            \f3class\-use\fP               API が使用されている場所のページを格納するディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
                Applet.html         Applet クラスを使用するページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
                AppletContext.html  AppletContext インタフェースを使用するページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
                AppletStub.html     AppletStub インタフェースを使用するページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
                AudioClip.html      AudioClip インタフェースを使用するページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
   \f3src\-html\fP                         ソースコードディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
       \f3java\fP                         パッケージディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
           \f3applet\fP                   サブパッケージディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
                Applet.html         Applet ソースコードのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
                AppletContext.html  AppletContext ソースコードのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
                AppletStub.html     AppletStub ソースコードのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
                AudioClip.html      AudioClip ソースコードのページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
.SS "生成される API 宣言"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
javadoc ツールは、各クラス、インタフェース、フィールド、コンストラクタ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
およびメソッドの説明の初めで宣言を生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
この宣言は、その API 項目の宣言です。たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
ブール型クラスの宣言は次のようになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
\f2public final class Boolean\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
\f2extends Object\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
\f2implements Serializable\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
Boolean.valueOf メソッドの宣言は次のようになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
\f2public static Boolean valueOf(String s)\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
javadoc ツールは修飾子 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
.BR public
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
.BR protected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
.BR private
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1043
.BR abstract
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
.BR final
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
.BR static
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
.BR transient
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
.BR volatile
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
を組み込むことができますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
.BR synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
.BR native 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
は組み込むことができません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
.BR synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1059
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1060
.BR native 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1061
修飾子は実装の詳細と見なされ、API 仕様の一部とは見なされません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
キーワード
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
.BR synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
に依存するよりも、「複数のスレッドによって単一の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
.BR Enumeration
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1067
を並行して使用してはならない」というように、並行処理のセマンティックスを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1068
コメント説明の中でドキュメント化するべきです。ドキュメントでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
これらのセマンティックスの達成方法を説明すべきではありません。別の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
例を挙げると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
.BR Hashtable
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
はスレッドに対して安全でなければなりませんが、エクスポートされるその
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1073
メソッドすべてを同期させることによってこれを実現すると明記する必要
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1074
はないということです。バケットレベルで内部的に同期をとる権限を留保して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
より高度な並行性を提供すべきです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
.SH "ドキュメンテーションコメント"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1079
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1080
オリジナルの「ドキュメンテーションコメントの仕様」は、「関連項目」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
.SS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
ソースコードへのコメントの挿入
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1085
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1086
ソースコードの任意の宣言 (クラス、インタフェース、メソッド、コンストラクタ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
またはフィールド) の前に、ドキュメンテーションコメント (doc コメント) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
を記述することができます。 各パッケージにドキュメンテーションコメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
作成でき、構文は若干異なりますが、概要にもドキュメンテーションコメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
作成できます。 ドキュメンテーションコメントは、Javadoc コメントとも呼ばれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1091
ドキュメンテーションコメントは、コメントの始まりを示す文字列 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1092
.B /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
 と、コメントの終わりを示す文字列 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
.B */ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
の間にある文字で構成されます。 行頭のアスタリスクは、各行に記述できます。詳細は、以下で説明します。 Linux ではテキストは、複数行にわたって記述できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1097
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1098
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
* This is the typical format of a simple documentation comment
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
* that spans two lines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1103
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1104
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1105
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1106
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
次のように、コメントは 1 行にまとめることもできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1112
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1113
/** This comment takes up only one line. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1114
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1115
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1117
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
コメントの配置 - ドキュメンテーションコメントが認識されるのは、クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
インタフェース、コンストラクタ、メソッド、またはフィールド
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
宣言の前に置かれた場合だけです (クラス、メソッド、およびフィールドの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1121
例を参照)。メソッドの本体に置かれたドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1122
コメントは無視されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1123
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
ツールは、宣言文ごとに 1 つのドキュメンテーションコメントだけを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
認識します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1127
よく発生する間違いは、重要な文をクラスコメントとクラス宣言の間に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1128
入れてしまうことです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1130
はクラスコメントを無視するため、注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1131
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1132
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1133
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1134
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1135
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
* This is the class comment for the class Whatever.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
import com.sun;   // MISTAKE - Important not to put statements here
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
public class Whatever {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1142
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1143
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1144
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
コメントの説明のあとにタグが続く - コメントの開始区切り文字である 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
.B /** 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
のあとからタグセクションまでが説明になります。 タグセクションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1150
先頭文字が 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1151
.B @ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1152
である行から始まります (行の先頭のアスタリスクおよび空白文字
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
は除く)。 説明を記述せず、コメントだけのタグを記述することもできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
説明は、タグセクション以降に続けることはできません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
タグの引数は複数の行にまたがって記述できます。 タグの数に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1156
制限はありません。何回も記述できるタグと、1 回しか記述できない
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
タグがあります。 次の例の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1158
.B @see 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1159
からタグセクションが始まります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1160
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1161
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1164
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
 * This sentence would hold the main description for this doc comment.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1168
 * @see java.lang.Object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1169
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1170
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1172
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1174
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1175
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1177
標準タグとインラインタグ: タグは、javadoc ツールが処理できる、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1178
doc コメント内の特別なキーワードです。javadoc ツールには、@tag として現れる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1179
標準タグと、中括弧内に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1180
.B {\f3@tag\f1}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1181
として現れるインラインタグがあります。解釈
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1182
させるためには、先頭のアスタリスク、空白、コメント区切り文字 (/**) を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
除いては標準タグが行の先頭であるように配置する必要があります。つ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
まり、ユーザはテキスト内の任意の位置で @ 文字を使用でき、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
この文字はタグの始めとは解釈されません。@ 文字で行を開
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
始してこれが解釈されないようにしたい場合は、HTML エンティティの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
&#064; を使用してください。各スタンドアロンタグには関連するテキストがあり
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
ます。これは、そのタグの後から次のタグの直前まで、または doc コメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1189
の最後までの任意のテキストです。関連付けられたテキストは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1190
複数行にまたがって記述できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
インラインタグは、そのテキストが許
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
可される位置にはどこでも指定でき、解釈の対象となります。次の例は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
標準タグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
.BR @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
とインラインタグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1196
.BR {@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1197
が含まれています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
 * @deprecated As of JDk 1.1, replaced by {@link #setBounds(int,int,int,int)}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1205
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1206
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1209
コメントは HTML で記述します。テキストは HTML で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
記述しなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
これは、HTML のエンティティを使う必要があること、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
および HTML タグを使用できること
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1213
を意味します。HTML は、使用するブラウザがサポートする
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1214
任意のバージョンを使うことが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1215
できます。標準ドックレットは、階層式スタイルシートと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
フレームを含むほかの部分 (ドキュメンテーションコメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
以外) は、HTML 3.2 に準拠したコードを生成するように記述
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
されています 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
(フレームセット対応のため、生成される各
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
ファイルは、「HTML 4.0」で始まる)。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1221
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1222
たとえば、より小さい (<) およびより大きい (>) という
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1223
記号は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1224
.B &lt; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1225
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1226
.BR &gt; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1227
と記述する必要があります。同様に、アンパサンド (&) は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1228
.BR &amp; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1229
と記述する必要があります。次の例で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1230
は、ボールドの HTML タグ <b> を示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1231
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1232
次に doc コメントを示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1233
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1234
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1235
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1236
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1237
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1238
* This is a <b>doc</b> comment.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1239
* @see java.lang.Object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1240
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1241
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1242
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1243
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1244
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1245
行頭のアスタリスク - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1246
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1247
は、doc コメントを解析するときに、各行の先頭にある
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1248
文字アスタリスク (*) をすべて破棄し
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1249
ます。また、最初のアスタリスク (*) より前の空白と
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1250
タブも破棄します。1.4 からは、行頭のアスタリスクを省略した場合、行頭の空白は削除されません。これにより、<PRE> タグの中の doc コメントに、サンプルコードをインデントを残したままで直接ペーストすることができます。空白は一般的に、タブよりも均一にブラウザで解釈されます。インデントは、区切り文字 /** や <PRE> タグではなく、左マージンに相対的です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
最初の文 - 各 doc コメントの最初の文は、宣言されている
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1253
エンティティに関する簡潔かつ完全
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1254
な説明を含む要約文でなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1255
この文は、空白、タブ、または行末記
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1256
号が続いている最初のピリオド、あるいは最初のスタンドアロンタグで終了します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1257
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1258
ツールは、HTML ページの最初にあるメンバ要約に、この最初の文をコピーします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1259
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1260
複数フィールドの宣言 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1261
.B java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1262
では、単一の文で複数のフィールドを宣言できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1263
しかし、この文のドキュメンテ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1264
ーションコメントは 1 つだけで、このコメントが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1265
すべてのフィールドにコピーされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1266
したがって、フィールドごとに個々の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
ドキュメンテーションコメントを付けたい場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1268
各フィールドを異なる文で宣言しなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1269
たとえば、次のドキュメンテー
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1270
ションコメントは単一の宣言としては意味を成さず、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1271
2 つの宣言として処理するべき
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1272
です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1273
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1274
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1275
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1276
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1277
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1278
* The horizontal and vertical distances of point (x,y)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1279
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1280
public int x, y;      // Avoid this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1281
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1282
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1283
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1285
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1286
ツールは、上記コードから次のドキュメントを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1287
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1288
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1289
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1290
public int x
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1291
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1292
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1293
The horizontal and vertical distances of point
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1294
(x,y).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1295
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1296
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1297
public int y
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1298
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
The horizontal and vertical distances of point
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1301
(x,y).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1302
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1303
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1304
ヘッダタグを使用するときは注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1305
メンバ用のドキュメントコ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1306
メントを書くときは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1307
.B <H1>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1308
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1309
.BR <H2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1310
などの HTML ヘッダタグを使用しないでください。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1311
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1312
が全ドキュメントを構造化して生成するため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1313
これらの構造化タグを使用すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1314
ドキュメントの書式が乱れる可能性があるためです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1315
しかし、クラスやパッケージの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1316
コメントでは、これらのヘッダタグを使用して構造化を指示してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1317
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1318
メソッドコメントの自動コピー
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1319
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1320
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1321
Javadoc ツールには、次の 2 つの場合に、クラスおよびインタフェースのメソッドコメントをコピーまたは「継承」する機能があります。コンストラクタ、フィールド、および入れ子のクラスは、ドキュメンテーションコメントを継承しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1322
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1323
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1324
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1325
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1326
\f3自動的にコメントを継承して、見つからないテキストを埋める\fP \- 主説明または、\f2@return\fP、\f2@param\fP、\f2@throws\fP タグが、メソッドコメントで見つからない場合、Javadoc ツールは、オーバーライドしたメソッドまたは実装している場合はそのメソッドから、対応する主説明およびタグコメントを、次のアルゴリズムに従ってコピーします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1327
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1328
厳密には、特定のパラメータの \f2@param\fP タグが見つからない場合、そのパラメータのコメントが、上位の継承階層のメソッドからコピーされます。特定の例外の \f2@throws\fP タグが見つからない場合、\f2その例外が宣言されている場合にかぎり\fP、その \f2@throws\fP タグがコピーされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1329
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1330
この動作はバージョン 1.3 以前の動作とは対照的です。これまでのバージョンでは、主説明またはタグが存在すれば、コメントは一切継承されませんでした。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1331
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1332
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1333
\f3{@inheritDoc} タグを持つコメントを明示的に継承する\fP \- インラインタグ \f2{@inheritDoc}\fP を、メソッドの主説明、または \f2@return\fP、\f2@param\fP、\f2@throws\fP タグコメントに挿入します。継承した対応する主説明またはタグコメントは、その箇所にコピーされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1334
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1335
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1336
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1337
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1338
ドキュメンテーションコメントを実際にコピーに利用するには、継承したメソッドのソースファイルが \-sourcepath で指定したパスだけに置かれていることが必要になります。コマンド行で、クラスもパッケージも渡す必要はありません。この点は、クラスが ドキュメント化されるクラスでなければならなかった 1.3.x 以前のリリースと異なります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1339
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1340
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1341
\f3クラスおよびインタフェースからの継承\fP \- クラスおよびインタフェースから継承する次の 3 つの場合に、コメントの継承が行われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1342
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1343
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1344
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1345
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1346
クラスのメソッドがスーパークラスのメソッドをオーバーライドしている
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1347
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1348
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1349
インタフェースのメソッドがスーパーインタフェースのメソッドをオーバーライドしている
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1350
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1351
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1352
クラスのメソッドがインタフェースのメソッドを実装している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1353
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1354
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1355
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1356
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1357
最初の 2 つのケース (メソッドがオーバーライドしている場合) では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1358
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1359
ツールは、オーバーライドしているメソッドのドキュメント内に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1360
「オーバーライド」という小見出しを生成し、コメントが継承されているかどうかにかかわらず、オーバーライドされている
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1361
メソッドへのリンクを書き込みます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1362
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1363
3 つ目のケース (特定のクラスのメソッドがインタフェースの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1364
メソッドを実装している場合) では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1365
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1366
ツールは、実装している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1367
メソッドのドキュメント内に「定義」という小見出しを生成し、コメントが継承されているかどうかにかかわらず、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1368
実装されているメソッドへのリンクを書き込みます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1369
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1370
メソッドの説明が継承されるアルゴリズム - あるメソッドに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1371
ドキュメンテーションコメントが記述されていない場合、または {@inheritDoc} タグがある場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1372
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1373
ツールは、次のようなアルゴリズムを使用して適切なコメントを検索します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1374
このアルゴリズムは、もっとも適切なドキュメンテーションコメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1375
検索できるように設計されており、スーパークラスよりも
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1376
インタフェースが優先されるようになっています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1377
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1378
1. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1379
直接に実装されている (または、拡張されている) インタフェースを、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1380
メソッドの宣言で implements (または extends) キーワードのあとに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1381
登場する順序で、1 つずつ調べる。 このメソッドについて
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1382
最初に見つかったドキュメンテーションコメントを採用する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1383
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1384
2. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1385
手順 1 でドキュメンテーションコメントが見つからなかった場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1386
直接実装されている (または、拡張されている) インタフェースの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1387
それぞれに対して、このアルゴリズム全体を再帰的に適用する (その際の順序は、手順 1 でインタフェースを調べたときの順序と同じ) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1388
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1389
3. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1390
手順 2 でドキュメンテーションコメントが見つからなかった場合で、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1391
このクラスが Object 以外のクラスである (インタフェースではない) 場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1392
次のように処理する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1393
.sp 1n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1394
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1395
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1396
a. スーパークラスにこのメソッドについてのドキュメンテーションコメントが記述されていれば、そのコメントを採用する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1397
b. 手順 3a でドキュメンテーションコメントが見つからなかった場合は、スーパークラスに対して、このアルゴリズム全体を適用する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1398
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1399
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1400
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1401
.SS "javadoc のタグ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1402
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1403
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1404
ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1405
.B java doc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1406
コメント内に埋め込まれた特殊なタグを解析します。これらの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1407
特殊な doc タグを使うと、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1408
書式の整った完全な API ドキュメントをソース
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1409
コードから自動的に生成できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1410
タグは、単価記号 (\f3@\f1) で始まり、大文字小文字が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1411
区別されます。これらのタグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1412
以下に示すとおりに、大文字と小文字を区別して入力する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1413
必要があります。タグは、行
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1414
の先頭 (ただし先行する空白と省略可能なアスタリスクは除く) から
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1415
始めなければなり
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1416
ません。慣習上、同じ名前のタグは 1 個所にまとめて記述します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1417
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1418
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1419
タグが複数ある場合は、すべてを 1 個所にまとめて記述します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1420
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1421
タグは次の 2 種類あります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1422
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1423
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1424
スタンドアロンタグ - 説明のあとのタグセクションだけに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1425
置くことができます。 このタグは、@tag のように中括弧で囲みません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1426
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1427
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1428
インラインタグ - コメントの説明内またはスタンドアロンタグの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1429
コメント中の任意の場所に置くことができます。 インラインタグは、{@tag} の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1430
ように中括弧で囲みます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1431
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1432
今後のリリースで導入されるタグについては、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1433
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1434
http://java.sun.com/j2se/javadoc/proposed\-tags.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1435
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1436
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1437
「\f2Proposed Tags\fP」を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1438
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1439
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1440
現時点で有効なタグは、次のとおりです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1441
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1442
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1443
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1444
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1445
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1446
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1447
center;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1448
cbp-1 cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1449
l l.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1450
タグ	導入された JDK/SDK のバージョン
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1451
@author	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1452
{@code}	1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1453
{@docRoot}	1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1454
@deprecated}	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1455
@exception	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1456
{@inheritDoc}	1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1457
{@link}	1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1458
{@linkplain}	1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1459
{@literal}	1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1460
@param	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1461
@return	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1462
@see	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1463
@serial	1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1464
@serialData	1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1465
@serialField	1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1466
@since	1.1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1467
@throws	1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1468
{@value}	1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1469
@version	1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1470
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1471
.if \n-(b.=0 .nr c. \n(.c-\n(d.-42
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1472
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1473
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1474
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1475
カスタムタグについては、\-tag オプションを参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1476
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1477
.BI @author  " name-text"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1478
.B \-author 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1479
オプションが使われている場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1480
生成されるドキュメントに、指定された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1481
name-text を持つ Author エントリを追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1482
1 つの doc コメントに複数の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1483
.B @author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1484
タグを含めることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1485
.B @author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1486
タグごとに 1 つ、またはタグごとに複数の名前を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1487
指定できます。前者の場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1488
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1489
ツールは、名前と名前の間にコンマ (\f3,\f1) とスペースを挿入します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1490
後者の場合、テキスト全体が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1491
解析されることなく生成されるドキュメントにコピーされるだけです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1492
このため、コンマ以外
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1493
の現地仕様の名前区切り文字を使う場合は、1 行に複数の名前を指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1494
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1495
詳細については、「タグを使用できる場所」および
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1496
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1497
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1498
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1499
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1500
\f2@author タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1501
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1502
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1503
@deprecated\  deprecated\-text 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1504
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1505
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1506
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1507
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1508
注: JDK 5.0 から、@Deprecated 注釈を使って特定のプログラム要素を非推奨にできるようになりました。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1509
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1510
この API は (動作はするが) 使用すべきでないことを示す
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1511
コメントを追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1512
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1513
 は、deprecated-text を説明の前に移動してイタリックにし、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1514
その前にボールドの警告
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1515
「推奨されません。」を追加します。このタグはすべての doc コメント (概要、パッケージ、クラス、インタフェース、コンストラクタ、メソッド、フィールド) で有効です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1516
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1517
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1518
deprecated-text の最初の文では、少なくともユーザにどのようなときに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1519
その API が推奨されないか、およびそれに代わる API を提示する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1520
必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1521
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1522
は、最初の文だけを要約セクションと索引にコピーします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1523
あとに続く文で、なぜその API が推奨されないかを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1524
説明することもできます。代わりの API を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1525
指し示す {\f3@link\f1} タグ (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1526
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1527
1.2 以降の場合) を含める必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1528
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1529
詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1530
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1531
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1532
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1533
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1534
\f2@deprecated タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1535
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1536
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1537
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1538
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1539
1.2 以降では、{\f3@link\f1} タグを使用してください。これにより、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1540
必要な場所にインラインで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1541
リンクが作成されます。たとえば、次のように使います。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1542
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1543
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1544
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1545
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1546
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1547
 * @deprecated  As of JDK 1.1, replaced by 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1548
 *    {@link #setBounds(int,int,int,int)}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1549
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1550
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1551
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1552
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1553
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1554
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1555
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1556
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1557
1.1 では、各 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1558
.B @deprecated 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1559
タグに 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1560
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1561
タグ (インラインにできない) を作成するのが標準の形式です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1562
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1563
推奨されないタグについての詳細は、「
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1564
.B @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1565
タグ」 を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1566
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1567
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1568
.B {@code text}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1569
<code>{@literal}</code> と同等です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1570
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1571
テキストを HTML マークアップまたは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1572
入れ子になった javadoc タグとして解釈せずに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1573
テキストをコードフォントで表示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1574
これにより doc コメントでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1575
パラメータの種類 ( <Object> )、不等号  ( 3 < 4 )、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1576
または矢印 ( <- ) などで、HTML エンティティ ( &lt; および &gt; )  ではなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1577
通常の山括弧 (< および >)  を使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1578
たとえば doc コメントのテキスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1579
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1580
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1581
{@code A<B>C} 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1582
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1583
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1584
は、生成された HTML ページで、次のようにそのまま表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1585
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1586
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1587
A<B>C
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1588
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1589
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1590
注目すべき点として、<B> は太字であると解釈されませんが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1591
コードフォントになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1592
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1593
コードフォントなしで同じ機能を実現するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1594
{@literal} を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1595
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1596
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1597
.B {@docRoot}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1598
生成された任意のページを起点とした、ドキュメントの (出力先) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1599
ルートディレクトリの相対パスを表します。このタグは、著作権ページ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1600
または会社のロゴなど、生成されるすべてのページから参照するファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1601
を取り込むときに使います。通常は、各ページの最下部から著作権
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1602
ページにリンクします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1603
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1604
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1605
この \f2{@docRoot}\fP タグは、コマンド行からも、ドキュメンテーションコメントの中でも使用できます。このタグは、@return、@param、@deprecated などの任意のタグのテキスト部分を含む、すべてのドキュメンテーションコメント、つまり概要、パッケージ、クラス、インタフェース、コンストラクタ、メソッド、およびフィールドで有効です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1606
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1607
1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1608
コマンド行では、次のようにヘッダ (header)、フッタ (footer)、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1609
またはページの最下部 (bottom)を定義します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1610
.sp 1n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1611
.B javadoc \-bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1612
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1613
注 -  Makefile の中で {\f3@docRoot\f1}をこのように利用する場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1614
一部の Makefile プログラムでは、中括弧 { } 文字をエスケープする
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1615
必要があります。 たとえば、Inprise MAKE バージョン 5.2 を 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1616
Windows 上で実行する場合は、{{\f3@docRoot\f1}} のように、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1617
中括弧を二重にする必要があります。さらに、\-bottom などの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1618
オプションに対する引数を、単一引用符ではなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1619
二重引用符で囲む必要があります。href 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1620
引数の値を囲む引用符は省略します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1621
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1622
2.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1623
doc コメントには次のように記述します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1624
.sp 1n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1625
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1626
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1627
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1628
* See the <a href="{@docRoot}/copyright.html">Copyright</a>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1629
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1630
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1631
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1632
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1633
このタグが必要な理由は、生成されるドキュメントが、サブパッケージと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1634
同じ階層のディレクトリに格納されるためです。たとえば、次のように指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1635
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1636
.ti +5n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1637
.B <a href="{@docRoot}/copyright.html">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1638
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1639
次のように解決されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1640
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1641
.ti +5n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1642
\f3<a href=".\|.\|/.\|.\|/copyright.html">\f1   .\|.\|. java/lang/Object.java の場合
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1643
.sp 1n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1644
および
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1645
.sp 1n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1646
.ti +5n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1647
\f3<a href=".\|.\|/.\|.\|/.\|.\|/copyright.html">\f1 .\|.\|. java/lang/ref/Reference.java の場合
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1648
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1649
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1650
.BI @exception  " class-name description"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1651
.B @exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1652
タグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1653
.BR @throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1654
と同義です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1655
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1656
{\f3@inheritDoc\f1}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1657
最も近いスーパークラスから現在の ドキュメンテーションコメントに、ドキュメントを継承します。 この機能により、コメントは継承ツリーの上位に移動し、開発者はコピーしたテキストに記述を追加することができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1658
.LP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1659
このタグは、ドキュメンテーションコメントの次の位置でのみ有効です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1660
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1661
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1662
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1663
メソッドの主説明ブロック内。この場合、主説明は、上位階層のクラスまたはインタフェースからコピーされる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1664
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1665
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1666
メソッドの @return、@param、@throws タグのテキスト引数内。この場合、タグテキストは、上位階層の対応するタグからコピーされる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1667
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1668
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1669
継承階層でコメントを見つける方法に関する正確な説明について、「メソッドコメントの自動コピー」を参照してください。このタグが見つからない場合、コメントは、この節で説明するルールに応じて、自動的に継承されるかどうかが決まります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1670
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1671
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1672
{@link\  package.class#member\  label} 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1673
表示テキスト label とのインラインリンクを挿入します。\f2label\fP は、参照クラスの指定されたパッケージ、クラス、またはメンバの名前のドキュメンテーションを指し示します。このタグは、@return、@param、@deprecated などの任意のタグのテキスト部分を含む、すべてのドキュメンテーションコメント、つまり概要、パッケージ、クラス、インタフェース、コンストラクタ、メソッド、およびフィールドで有効です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1674
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1675
このタグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1676
.B @see 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1677
タグとよく似ています。どちらのタグも、package.class#member および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1678
.BI label 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1679
の参照の仕方が同じで、有効な構文もまったく同じです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1680
大きな違いは、{\f3@link\f1} は、リンクを [関連項目] セクションに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1681
置くのではなく、インラインリンクを生成するということです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1682
また、インラインテキストのほかの部分と区別するために、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1683
{\f3@link\f1} タグの最初と最後に中括弧を記述します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1684
ラベルの中で「}」を使う必要がある場合は、HTML 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1685
エンティティの「&#125;」を使います。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1686
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1687
1 つの文の中で使用できる {@link} タグの数に制限はありません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1688
このタグは、ドキュメンテーションコメントの説明部分、または 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1689
.BR @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1690
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1691
.BR @return
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1692
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1693
.BR @param 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1694
などの任意のタグのテキスト部分で使うことができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1695
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1696
たとえば、次のコメントでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1697
.B getComponentAt(int, int) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1698
メソッドを参照しています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1699
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1700
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1701
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1702
Use the {\f3@link #getComponentAt(int, int) getComponentAt\f1} method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1703
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1704
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1705
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1706
標準ドックレットでは、上記のコメントから次の HTML が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1707
生成されます (このコメントが同じパッケージの別のクラスを参照している場合)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1708
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1709
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1710
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1711
Use the 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1712
<a href="Component.html#getComponentAt(int, int)">getComponentAt</a>method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1713
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1714
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1715
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1716
この HTML は、Web ページ上では次のように表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1717
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1718
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1719
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1720
Use the getComponentAt method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1721
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1722
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1723
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1724
{\f3@link\f1} を、ドキュメント化の対象にしていないクラスにまで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1725
拡張するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1726
.BR \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1727
オプションを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1728
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1729
詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1730
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1731
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#{@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1732
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1733
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1734
\f2{@link} タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1735
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1736
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1737
{@linkplain package.class#member label}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1738
リンクのラベルがコードフォントではなくプレーンテキストで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1739
表示されている点以外は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1740
{\f3@link\f1} と同じです。 ラベルがプレーンテキストで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1741
記述されている場合に便利です。次の例を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1742
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1743
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1744
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1745
Refer to {\f3@linkplain\f1 add() the overridden method}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1746
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1747
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1748
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1749
これは以下のように表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1750
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1751
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1752
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1753
Refer to the overridden method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1754
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1755
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1756
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1757
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1758
.B {@literal  text}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1759
テキストを HTML マークアップまたは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1760
入れ子になった javadoc タグとして解釈せずに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1761
テキストをコードフォントで表示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1762
これにより doc コメントでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1763
パラメータの種類 ( <Object> )、不等号  ( 3 < 4 )、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1764
または矢印 ( <- ) などで、HTML エンティティ ( &lt; および &gt; )  ではなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1765
通常の山括弧 (< および >)  を使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1766
たとえば doc コメントのテキスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1767
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1768
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1769
{@literal A<B>C}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1770
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1771
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1772
は、生成された HTML ページはブラウザで次のようにそのまま表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1773
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1774
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1775
A<B>C
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1776
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1777
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1778
注目すべき点として、<B> は太字であると解釈され、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1779
コードフォントになりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1780
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1781
コードフォントで同じ機能を実現するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1782
{@code} を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1783
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1784
.BI @param  " parameter-name description"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1785
指定した parameter-name と指定した description を使用して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1786
パラメータを「Parameters」セクションに追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1787
doc コメントを記述するときは、description を複数行に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1788
続けることができます。このタグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1789
メソッド、コンストラクタ、またはクラスの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1790
doc コメント内でのみ有効です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1791
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1792
\f2parameter\-name\fP は、メソッドまたはコンストラクタでのパラメータの名前か、クラス、メソッドまたはコンストラクタのタイプパラメータの名前になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1793
山括弧でパラメータ名を囲むと、型パラメータを使用することを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1794
指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1795
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1796
クラスの型パラメータの例: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1797
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1798
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1799
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1800
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1801
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1802
      * @param <E> Type of element stored in a list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1803
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1804
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1805
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1806
     public interface List<E> extends Collection<E> {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1807
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1808
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1809
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1810
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1811
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1812
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1813
メソッドの型パラメータの例: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1814
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1815
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1816
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1817
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1818
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1819
      * @param string  the string to be converted
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1820
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1821
      * @param type    the type to convert the string to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1822
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1823
      * @param <T>     the type of the element
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1824
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1825
      * @param <V>     the value of the element
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1826
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1827
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1828
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1829
     <T, V extends T> V convert(String string, Class<T> type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1830
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1831
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1832
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1833
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1834
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1835
詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1836
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1837
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@param
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1838
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1839
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1840
\f2@param タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1841
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1842
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1843
@return\  description 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1844
「戻り値」セクションを追加して、\f2description\fP のテキストを書き込みます。このテキストでは、戻り値の型と、取り得る値の範囲について記述する必要があります。このタグは、メソッドのドキュメンテーションコメントでのみ有効です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1845
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1846
詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1847
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1848
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@return
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1849
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1850
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1851
\f2@return タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1852
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1853
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1854
@see\  reference 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1855
「関連項目」見出しを追加し、\f2reference\fP を指すリンクか、またはテキストエントリを書き込みます。1 つのドキュメンテーションコメントには、任意の数の \f2@see\fP タグを指定できます。すべての \f2@see\fP タグの内容は、同じ見出しの下にグループ化されます。\f2@see\fP タグには、次の 3 種類の形式があります。もっともよく使われるのは、3 番目の形式です。このタグは、すべてのドキュメンテーションコメント、つまり概要、パッケージ、クラス、インタフェース、コンストラクタ、メソッド、およびフィールドで有効です。パッケージ、クラス、またはメンバに対するインラインリンクを文中に挿入する方法は、\f2{@link}\fP を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1856
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1857
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1858
@see "string" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1859
string のテキストエントリを追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1860
リンクは生成されません。string は、書籍、または
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1861
URL ではアクセスできない情報の参照先です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1862
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1863
ツールは、最初の文字が二重引用符 (") かどうかを調べて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1864
上の 2 つの形式とこの形式とを区
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1865
別します。次に例を示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1866
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1867
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1868
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1869
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1870
     @see "The Java Programming Language"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1871
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1872
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1873
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1874
これは次のようなテキストを生成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1875
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1876
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1877
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1878
     関連項目:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1879
          "The Java Programming Language"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1880
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1881
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1882
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1883
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1884
\f3@see <a href="\f2URL#value\f3">\f2label\f3</a>\f1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1885
.IR URL#value 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1886
で定義されたとおりにリンクを追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1887
.I URL#value 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1888
は、相対 URL または絶対 URL です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1889
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1890
ツールは、最初の文字として、小なり括弧 (\f3<\f1) を探すことで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1891
このリンクをその他の場合と区別します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1892
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1893
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1894
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1895
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1896
     @see <a href="spec.html#section">Java Spec</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1897
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1898
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1899
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1900
これは次のようなリンクを生成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1901
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1902
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1903
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1904
    関連項目:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1905
          Java Spec
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1906
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1907
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1908
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1909
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1910
.BI @see  " package.class#member label"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1911
参照される Java 言語で指定された名前のドキュメントを指す、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1912
表示テキスト label を持つ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1913
リンクを追加します。label は省略可能です。label を省略した場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1914
該当する名前が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1915
適切に短くされて (「名前の表示方法」を参照)、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1916
表示テキストとして代わりに表示されます。-noqualifier を使用すると、表示テキストからパッケージ名が全体的に削除されます。ラベルは、自動生成される表示テキストとは異なる表示テキストを指定する場合に使います。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1917
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1918
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1919
バージョン 1.2 では、ラベルではなく、名前だけが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1920
HTML タグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1921
.B <code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1922
に囲まれて自動的に表示されます。バージョン 1.2.2 以降は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1923
.B <code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1924
は常に、ラベルが使用されているかどうかにかかわらず、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1925
表示可能なテキストを囲みます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1926
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1927
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1928
.I package.class#member 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1929
には、Java 言語で有効な任意の名前、つまりパッケージ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1930
クラス、インタフェース、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1931
コンストラクタ、メソッド、またはフィールドの名前を指定します
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1932
。ただし、メンバ名の前の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1933
ドットは、ハッシュ文字 (#) で置き換えます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1934
指定した名前が、ドキュメント化されるクラス
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1935
にある場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1936
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1937
ツールは該当する名前へのリンクを自動的に作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1938
外部参照クラスへのリンクを作成する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1939
には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1940
.B \-link
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1941
オプションを使います。参照されるクラスに属していない名前の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1942
ドキュメントを参
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1943
照するには、ほかの 2 つの形式の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1944
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1945
タグを使います。1 番目の引数については、「名前の指定」 で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1946
詳しく説明します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1947
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1948
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1949
.I label 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1950
は省略可能なテキストで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1951
リンクのラベルとして表示されます。label には空白を含
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1952
めることができます。label を省略した場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1953
.I package.class.member 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1954
が、現在のクラスおよびパッケージに応じて
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1955
適切に短くされて表示されます。「名前の表示方法」を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1956
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1957
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1958
空白文字は 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1959
.I package.class#member 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1960
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1961
.IR label 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1962
の間の区切り文字です。括弧内の空白文字は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1963
ラベルの開始を意味しないため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1964
メソッドのパラメータ間のデリミタとして使うことができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1965
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1966
例-この例では、Character クラスの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1967
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1968
タグが String クラスの equals メソッドを参照しています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1969
タグには、名前 \f3String#equals(Object)\f1 とラベル \f3equals\f1 の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1970
両方の引数が含まれています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1971
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1972
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1973
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1974
      /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1975
      * @see String#equals(Object) equals
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1976
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1977
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1978
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1979
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1980
標準ドックレットは、次のような HTML を生成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1981
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1982
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1983
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1984
    <dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1985
    <dt><b>関連項目:</b>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1986
    <dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals</code></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1987
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1988
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1989
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1990
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1991
これは、ブラウザでは次のように表示され、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1992
ラベルがリンクテキストになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1993
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1994
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1995
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1996
     関連項目:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1997
          equals
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1998
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1999
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2000
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2001
.B 名前の指定:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2002
この
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2003
.I package.class#member
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2004
の名前は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2005
.BR java.lang.String#toUpperCase() 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2006
のように完全指定することも、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2007
.B String#toUpperCase() 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2008
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2009
.BR #toUpperCase() 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2010
などのように完全指定しないことも可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2011
完全指定しない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2012
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2013
ツールは、通常の Java コンパイラの検索順序で検索を行います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2014
詳細は、以下の「
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2015
.BR @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2016
の検索順序」を参照してください。指定する名前では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2017
メソッドの複数の引数の型の間など、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2018
括弧内に空白を含めることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2019
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2020
短い部分修飾名を指定することの利点は、入力する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2021
文字数が減ることと、ソースコードが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2022
読みやすくなることです。以下の表に示すのは、さまざまな
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2023
形式の名前です。Class には
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2024
クラスかインタフェース、Type にはクラス、インタフェース、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2025
配列、または基本データ型、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2026
method にはメソッドまたはコンストラクタを指定できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2027
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2028
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2029
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2030
box;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2031
lp-1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2032
@see package.class#member の一般的な形式
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2033
_
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2034
現在のクラスのメンバを参照する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2035
@see #field
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2036
@see #method(Type, Type,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2037
@see #method(Type argname, Type argname,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2038
@see #constructor(Type, Type,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2039
@see #constructor(Type argname, Type argname,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2040
_
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2041
T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2042
現在の、またはインポートされたパッケージの別のクラスを参照する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2043
T}	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2044
@see Class#field
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2045
@see Class#method(Type, Type,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2046
@see Class#method(Type argname, Type argname,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2047
@see Class#constructor(Type, Type,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2048
T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2049
@see Class#constructor(Type argname, Type argname,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2050
T}	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2051
@see Class.NestedClass
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2052
@see Class
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2053
_
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2054
別のパッケージの要素を参照する (完全修飾)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2055
@see package.Class#field
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2056
@see package.Class#method(Type, Type,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2057
@see package.Class#method(Type argname, Type argname,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2058
@see package.Class#constructor(Type, Type,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2059
T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2060
@see package.Class#constructor(Type argname, Type argname,...)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2061
T}	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2062
@see package.Class.NestedClass
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2063
@see package.Class
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2064
@see package
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2065
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2066
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2067
上の表に対する注を以下に示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2068
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2069
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2070
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2071
クラスまたはパッケージを省いた最初の形式のセットでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2072
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2073
ツールは現在のクラス階層だけで検索を行います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2074
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2075
ツールは、現在のクラスかインタフェースのメンバ、スーパークラスか
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2076
スーパーインタフェースの 1 つ、または
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2077
親クラスかインタフェースの 1 つ (検索手順 1 〜 3) を検索します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2078
現在のパッケージのほかの部分やほかのパッケージ (検索手順 4 〜 5) は
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2079
検索しません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2080
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2081
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2082
メソッドまたはコンストラクタが、getValue のように
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2083
括弧を付けずに名前として入力され、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2084
かつ同じ名前のフィールドがない場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2085
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2086
ツールは正確にリンクを作成しますが、括弧と引数を追加するように
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2087
促す警告メッセージを出力
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2088
します。このメソッドをオーバーロードした場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2089
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2090
ツールは、指定されたメソッドではなく、検索で見つかった
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2091
最初のメソッドにリンクします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2092
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2093
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2094
入れ子の内部クラスは、どの形式の場合でも、単に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2095
.BR inner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2096
という形ではなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2097
.BR outer.inner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2098
という形で指定しなければなりません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2099
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2100
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2101
すでに述べたとおり、クラスとメンバを区切るのに、ドット (\f3.\f1) ではなく
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2102
ハッシュ文字 (\f3#\f1) が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2103
使われていることに注意してください。ドットは、クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2104
入れ子のクラス、パッケージ、および
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2105
サブパッケージを区切るのにも使われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2106
ただし、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2107
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2108
ツールでは一般に許容範囲が広く、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2109
あいまいさがなければ、ドットでも正しく解析されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2110
その場合でも警告は表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2111
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2112
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2113
.B @see の検索順序:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2114
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2115
は、ソースファイル (\f3.java\f1)、パッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2116
ファイル (\f3package.html\f1 か \f3package\-info.java\f1)、または
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2117
概要ファイル (\f3overview.html\f1) 内で使われる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2118
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2119
タグを処理します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2120
あとの 2 つのファイルでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2121
.BR @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2122
を使って指定する名前を完全修飾する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2123
ソースファイルでは、完全修飾名
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2124
と部分修飾名のどちらを指定することもできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2125
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2126
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2127
ツールが、完全修飾されていない 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2128
.B .java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2129
ファイルで 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2130
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2131
タグを見つけた場合、指定された名前を Java コンパイラと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2132
同じ順序で検索します。ただし、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2133
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2134
ツールは、一部の名前空間のあいまいさは検出しません。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2135
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2136
ツールが、ソースコードにこれらのエラーが存在していないことを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2137
前提として動作するためです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2138
検索順序は、「Java Language Specification」第 2 版の第 6 章「Names」で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2139
正式に定義されています。具体的には、検索は次の順序で行われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2140
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2141
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2142
1. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2143
現在のクラスまたはインタフェース 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2144
.PD 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2145
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2146
2. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2147
名前を囲むクラスとインタフェース。もっとも近いものを最初に検索 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2148
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2149
3. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2150
スーパークラスとスーパーインタフェース。もっとも近いものを最初に検索 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2151
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2152
4. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2153
現在のパッケージ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2154
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2155
5. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2156
インポートされるパッケージ、クラス、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2157
およびインタフェース。import 文の順序に従って検索 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2158
.PD
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2159
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2160
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2161
ツールは、一致する名前が見つかるまで、各クラスについて
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2162
手順 1 〜 3 を繰り返して検索を続け
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2163
ます。つまり、現在のクラスとそのクラスを囲む
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2164
クラス E を検索したあと、E のスーパクラスを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2165
検索し、最後に E を囲むクラスを検索します。手順 4 と 5 では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2166
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2167
ツールは、1 つのパッケージ内でのクラスまたはインタフェースの検索を、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2168
なんらかの決まった順
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2169
序で行うわけではありません (この検索順序はコンパイラに依存します)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2170
手順 5 では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2171
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2172
ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2173
.BR java.lang 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2174
を検索します。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2175
.BR java.lang 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2176
がすべてのプログラムによって自動的にインポートされるためです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2177
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2178
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2179
ツールは、必ずしもサブクラスを検索するわけではなく、Javadoc ツールの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2180
実行中にほかのパッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2181
のドキュメントが生成される場合でも、ほかのパッケージの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2182
検索は行いません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2183
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2184
.B @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2185
タグが 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2186
.B java.awt.event.KeyEvent 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2187
クラスにあって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2188
.B java.awt 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2189
パッケージにある名前を参照する場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2190
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2191
は、そのクラスがインポートしない限りそのパッケージを検索しません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2192
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2193
.B 名前の表示方法:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2194
.I label 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2195
が省略された場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2196
.I package.class.member 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2197
が表示されます。通常、package.class.member は、現在の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2198
クラスおよびパッケージに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2199
応じて適切に短くされます。「短くされる」とは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2200
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2201
ツールが必要最小限の名前を表示するということです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2202
たとえば、String.toUpperCase() メソッドが同じ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2203
クラスのメンバへの参照と、別のクラスのメンバへの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2204
参照を含んでいる場合、クラス名は後者の場合だけ表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2205
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2206
パッケージ名を広域的に削除するには、\-noqualifier を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2207
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2208
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2209
.TP 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2210
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2211
box, center;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2212
cbp-1 | cbp-1 | cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2213
l | l | l .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2214
参照の種類	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2215
String.toUppercase() での例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2216
T}	表示
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2217
_
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2218
T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2219
@see タグが同じクラス、同じパッケージのメンバを参照している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2220
T}	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2221
@see String#toLowerCase()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2222
T}	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2223
toLowerCase() (パッケージおよびクラス名は省略)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2224
T}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2225
_
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2226
T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2227
@see タグが異なるクラス、同じパッケージのメンバを参照している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2228
T}	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2229
@see Character#toLowerCase(char)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2230
T}	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2231
Character.toLowerCase(char) (パッケージ名は省略し、クラス名を含む)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2232
T}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2233
_
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2234
T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2235
@see タグが異なるクラス、異なるパッケージのメンバを参照している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2236
T}	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2237
@see java.io.File#exists()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2238
T}	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2239
java.io.File.exists() (パッケージ名とクラス名を含む)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2240
T}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2241
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2242
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2243
\f3@see の例\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2244
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2245
右側のコメントは、\f2@see\fP タグが別のパッケージ (\f2java.applet.Applet\fP など) のクラス内にある場合に、名前がどのように表示されるかを示しています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2246
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2247
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2248
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2249
                                           See also: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2250
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2251
@see java.lang.String                   //  String                          \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2252
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2253
@see java.lang.String The String class  //  The String class                \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2254
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2255
@see String                             //  String                          \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2256
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2257
@see String#equals(Object)              //  String.equals(Object)           \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2258
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2259
@see String#equals                      //  String.equals(java.lang.Object) \fP\f3  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2260
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2261
@see java.lang.Object#wait(long)        //  java.lang.Object.wait(long)     \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2262
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2263
@see Character#MAX_RADIX                //  Character.MAX_RADIX             \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2264
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2265
@see <a href="spec.html">Java Spec</a>  //  Java Spec           \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2266
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2267
@see "The Java Programming Language"    //  "The Java Programming Language"        \fP\f3 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2268
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2269
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2270
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2271
.I @see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2272
を、ドキュメント化の対象にしていないクラスにまで拡張するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2273
.I -link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2274
オプションを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2275
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2276
詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2277
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2278
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2279
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2280
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2281
\f2@see タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2282
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2283
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2284
.BI @serial  " field-description" | include | exclude
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2285
デフォルトの直列化可能フィールドの doc コメントで使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2286
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2287
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2288
省略可能な field-description は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2289
フィールドの doc コメントを拡張します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2290
この説明では、フィールドの意味および
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2291
取り得る値のリストを指定しなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2292
必要な場合には、複数の行にまたがって説明を記述することができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2293
標準ドックレットは、この情報を、直列化された形式のページに追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2294
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2295
クラスを直列化したあとしばらくしてから直列化可能フィールドをクラスに追加した場合、主説明に、追加したバージョンを識別する文を追加する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2296
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2297
.BR include 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2298
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2299
.BR exclude
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2300
引数は、直列化された形式のページにクラスまたはパッケージを含めるべきか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2301
あるいはこれらの引数を除くべきかを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2302
これらは、次のように動作します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2303
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2304
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2305
\(bu 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2306
.BR Serializable
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2307
を実装する public クラスまたは protected クラスは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2308
そのクラス (またはそのパッケージ) が 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2309
.BR @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2310
.BR exclude
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2311
とマークされていない限り含められます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2312
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2313
\(bu 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2314
.BR Serializable
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2315
を実装する private クラスまたは package\-private クラスは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2316
そのクラス (またはそのパッケージ) が 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2317
.BR @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2318
.BR include
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2319
とマークされていない限り除かれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2320
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2321
例: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2322
.BR javax.swing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2323
パッケージは、(package.html または \f2package\-info.java\fP 内で) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2324
.BR @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2325
.BR exclude
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2326
とマークされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2327
public クラスである
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2328
.BR java.sercurity.BasicPermission
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2329
は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2330
.BR @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2331
.BR exclude
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2332
とマークされます。package\-private クラスである
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2333
.BR java.util.PropertyPermissionCollection
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2334
は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2335
.BR @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2336
.BR include
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2337
とマークされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2338
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2339
クラスレベルのタグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2340
.BR @serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2341
は、パッケージレベルの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2342
.BR @serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2343
をオーバーライドします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2344
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2345
これらのタグの使用法についての詳細と使用例は、「Java オブジェクト直列化仕様」の第 1.6 節「クラスの直列化可能なフィールドおよびデータの文書化」を参照してください。また、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2346
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2347
http://java.sun.com/products/jdk/serialization/faq/#javadoc_warn_missing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2348
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2349
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2350
「\f2直列化の FAQ\fP」も参照してください。この FAQ には、「\-private スイッチを指定しないで javadoc を実行しているのに private フィールドの @serial タグが見つからないという javadoc の警告が表示される」などの一般的な質問への回答が記載されています。直列化形式仕様にクラスを含める場合には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2351
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2352
http://java.sun.com/j2se/javadoc/writingapispecs/serialized\-criteria.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2353
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2354
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2355
「\f2Sun の仕様\fP」も参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2356
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2357
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2358
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2359
.BI @serialField  " field-name  field-type  field-description"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2360
Serializable クラスの serialPersistentFields メンバの ObjectStreamField コンポーネント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2361
をドキュメント化します。各 ObjectStreamField コンポーネントに対して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2362
.B @serialField 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2363
タグを 1 つ使う必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2364
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2365
.BI @serialData  " data-description"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2366
.I data-description 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2367
は、直列化された形式でのデータの型と順序を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2368
説明するテキストです。 このデータには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2369
特に、writeObject メソッドによって書き込まれる省略可能な
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2370
データ、および Externalizable.writeExternal メソッドによって
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2371
書き込まれるすべてのデータ (基底クラスを含む) が含まれます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2372
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2373
.B @serialData
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2374
タグは、writeObject、readObject、writeExternal、および readExternal の各メソッドの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2375
doc コメントで使用できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2376
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2377
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2378
@since\  since\-text 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2379
生成ドキュメントに「導入されたバージョン」見出しを追加し、指定された \f2since\-text\fP を書き込みます。このテキストには、特別な内部構造はありません。このタグは、すべてのドキュメンテーションコメント、つまり概要、パッケージ、クラス、インタフェース、コンストラクタ、メソッド、およびフィールドで有効です。このタグは、特定の変更または機能が、\f2since\-text\fP に示されたソフトウェアリリース以降、存在していることを意味します。次に例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2380
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2381
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2382
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2383
    @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2384
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2385
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2386
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2387
Java プラットフォームのソースコードの場合、このタグは、Java プラットフォーム API 仕様のバージョンを示します。その変更や機能がリファレンス実装に追加された時期を示すとは限りません。複数の @since タグを使用でき、複数の @author タグのように扱われます。プログラム要素が複数の API で使用される場合、複数のタグを使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2388
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2389
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2390
.BI @throws  " class-name  description"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2391
.B @throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2392
タグと 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2393
.B @exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2394
タグは同義です。生成されるドキュメンテーションに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2395
.I class-name 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2396
および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2397
.I description 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2398
テキストを持つ [例外] 小見出しを追加します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2399
.I class-name 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2400
は、該当するメソッドによって
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2401
スローされる可能性のある例外の名前です。このタグは、doc コメントまたはコンストラクタでのみ有効です。このクラスが完全
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2402
修飾されていない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2403
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2404
ツールは検索順序に従ってクラスを探します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2405
同じまたは異なる例外の doc コメントで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2406
複数の @throws タグを使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2407
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2408
すべてのチェック済み例外がドキュメント化されるようにするために、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2409
@throws タグが throws 節内の例外用に存在しない場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2410
@throws タグのあるドキュメントであるかのように、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2411
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2412
ツールによって例外が HTML 出力に説明なしで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2413
自動的に追加されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2414
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2415
オーバーライドされたメソッドで明示的に例外が宣言されている場合に限って、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2416
オーバーライドされたメソッドからサブクラスへ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2417
@throws ドキュメントがコピーされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2418
インタフェースメソッドから実装メソッドにコピーされる場合も
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2419
同様です。{@inheritDoc} を使用して、継承ドキュメントに対して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2420
強制的に @throws を適用することも可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2421
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2422
詳細は
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2423
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2424
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2425
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2426
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2427
\f2@throws タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2428
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2429
.B {@value package.class#field}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2430
{@value} が静的フィールドの doc コメントで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2431
引数なしで使用されている場合、その定数の値が表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2432
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2433
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2434
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2435
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2436
* The value of this constant is {@value}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2437
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2438
public static final String SCRIPT_START = "<script>"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2439
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2440
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2441
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2442
任意の doc コメント内で引数
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2443
.B package.class#field
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2444
 ありで使用されている場合は、指定した定数の値が表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2445
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2446
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2447
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2448
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2449
* Evaluates the script starting with {@value #SCRIPT_START}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2450
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2451
public String evalScript(String script) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2452
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2453
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2454
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2455
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2456
引数 package.class#field は、@see 引数と同一の形式になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2457
ただし、メンバが静的フィールドになければならない点が異なります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2458
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2459
これらの定数での値は、「定数フィールド値」ページにも表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2460
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2461
.BI @version  " version-text"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2462
\-version オプションが使われている場合、生成ドキュメントに「バージョン」小見出しを追加して、指定された \f2version\-text\fP を書き込みます。このタグは、このコードが含まれるソフトウェアの現在のバージョン番号を保持するように意図されています。これに対し、@since は、このコードが導入されたバージョン番号を保持します。\f2version\-text\fP には、特別な内部構造はありません。バージョンタグを使用できる場所を調べるには、「タグを使用できる場所」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2463
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2464
1 つのドキュメンテーションコメントに複数の \f2@version\fP タグを含めることができます。必要に応じて、\f2@version\fP タグごとに 1 つのバージョン番号を指定することも、タグごとに複数のバージョン番号を指定することもできます。前者の場合は、Javadoc ツールによって、名前と名前の間にコンマ (\f2,\fP) とスペースが挿入されます。後者の場合は、テキスト全体が、解析されることなく、生成ドキュメントにそのままコピーされます。したがって、コンマではなく、各言語に対応した名前区切り文字を使う必要がある場合は、1 つのタグに複数の名前を指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2465
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2466
詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2467
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2468
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2469
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2470
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2471
\f2@version タグのドキュメント\fPを参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2472
.SS "タグを使用できる場所"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2473
以下では、タグを使用できる場所について説明します。@see、@since、@deprecated、{@link}、{@linkplain} および {@docroot} のタグは、すべての doc コメントで使用できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2474
.SS "概要ドキュメントタグ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2475
概要タグは、概要ページのドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2476
コメント (通常は \f3overview.html\f1 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2477
という名前のソースファイル内にある) で使用できるタグです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2478
ほかのドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2479
コメントと同様に、これらのタグは、説明のあとで使う必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2480
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2481
注:バージョン 1.2 では、概要ドキュメント内の {\f3@link\f1} タグに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2482
バグがあります。テキストは適切に表示されますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2483
リンクが設定されません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2484
現在のところ、{\f2@docRoot\f1} タグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2485
概要ドキュメント内では動作しません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2486
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2487
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2488
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2489
;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2490
cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2491
l .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2492
概要タグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2493
@see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2494
@since
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2495
@author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2496
@version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2497
{@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2498
{@linkplain}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2499
{@docRoot}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2500
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2501
.if \n-(b.=0 .nr c. \n(.c-\n(d.-20
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2502
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2503
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2504
.SS "パッケージドキュメントタグ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2505
パッケージタグは、パッケージのドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2506
コメント (\f3package.html\f1 または \f2package\-info.java\fP という
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2507
名前のソースファイルに存在) で使用できるタグです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2508
ここで使用できる @serial タグは、include または 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2509
exclude 引数を指定したものだけです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2510
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2511
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2512
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2513
;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2514
cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2515
l .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2516
パッケージタグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2517
@see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2518
@since
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2519
@serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2520
@author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2521
@version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2522
{@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2523
{@linkplain}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2524
{@docRoot}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2525
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2526
.if \n-(b.=0 .nr c. \n(.c-\n(d.-22
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2527
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2528
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2529
.SS "クラスおよびインタフェースドキュメントタグ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2530
次に示すのは、クラスまたはインタフェースのドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2531
コメントで使用できるタグです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2532
ここで使用できる @serial タグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2533
include または exclude 引数を指定したものだけです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2534
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2535
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2536
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2537
;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2538
cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2539
l .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2540
クラスおよびインタフェースタグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2541
@see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2542
@since
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2543
@deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2544
@serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2545
@author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2546
@version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2547
{@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2548
{@linkplain}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2549
{@docRoot}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2550
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2551
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2552
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2553
次は、クラスコメントの例です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2554
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2555
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2556
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2557
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2558
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2559
* A class representing a window on the screen.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2560
* For example:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2561
* <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2562
*    Window win = new Window(parent);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2563
*    win.show();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2564
* </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2565
*
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2566
* @author  Sami Shaio
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2567
* @version 1.13, 06/08/06
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2568
* @see     java.awt.BaseWindow
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2569
* @see     java.awt.Button
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2570
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2571
class Window extends BaseWindow {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2572
...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2573
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2574
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2575
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2576
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2577
.SS "フィールドドキュメントタグ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2578
次に示すのは、フィールドのドキュメンテーションコメントで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2579
使用できるタグです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2580
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2581
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2582
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2583
;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2584
cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2585
l .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2586
フィールドタグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2587
@see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2588
@since
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2589
@deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2590
@serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2591
@serialField
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2592
{@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2593
{@linkplain}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2594
{@docRoot}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2595
{@value}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2596
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2597
.if \n-(b.=0 .nr c. \n(.c-\n(d.-24
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2598
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2599
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2600
次は、フィールドコメントの例です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2601
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2602
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2603
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2604
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2605
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2606
* The X-coordinate of the component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2607
*
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2608
* @see #getLocation()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2609
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2610
int x = 1263732;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2611
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2612
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2613
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2614
.SS "コンストラクタおよびメソッドドキュメントタグ"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2615
次に、コンストラクタまたはメソッドのドキュメンテーションコメント内で表示できるタグを示します。ただし、@return はコンストラクタでは表示できず、{@inheritDoc} は
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2616
表示に制限があります。@serialData タグは特定の直列化メソッドの doc コメントでのみ使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2617
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2618
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2619
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2620
;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2621
cbp-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2622
l .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2623
メソッドおよびコンストラクタタグ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2624
@see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2625
@since
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2626
@deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2627
@param
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2628
@return
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2629
@throws and @exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2630
@serialData
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2631
{@link}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2632
{@linkplain}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2633
{@inheritDoc}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2634
{@docRoot}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2635
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2636
.if \n-(b.=0 .nr c. \n(.c-\n(d.-28
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2637
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2638
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2639
次はメソッドの doc コメントの例です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2640
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2641
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2642
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2643
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2644
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2645
* Returns the character at the specified index. An index
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2646
* ranges from <code>0</code> to <code>length() - 1</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2647
*
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2648
* @param     index  the index of the desired character.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2649
* @return    the desired character.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2650
* @exception StringIndexOutOfRangeException
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2651
*              if the index is not in the range <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2652
*              to <code>length()-1</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2653
* @see       java.lang.Character#charValue()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2654
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2655
public char charAt(int index) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2656
...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2657
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2658
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2659
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2660
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2661
.SH "オプション"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2662
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2663
ツールは、ドックレットを使って出力を決定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2664
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2665
ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2666
.B \-doclet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2667
オプションでカスタムドックレットが指定されている場合以外は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2668
デフォルトの標準ドック
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2669
レットを使います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2670
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2671
ツールには、任意のドックレットとともに使用できるコマンド行
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2672
オプションがあります。これらのオプ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2673
ションについては、後述の「javadoc のオプション」で説明します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2674
標準ドックレットでは、こ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2675
のほかに、いくつかの追加のコマンド行オプションが提供されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2676
これらのオプションに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2677
ついては、後述の「標準ドックレットが提供するオプション」で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2678
説明します。どのオプション
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2679
名も大文字と小文字を区別しません。ただし、オプションの引数では
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2680
大文字と小文字が区
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2681
別されることがあります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2682
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2683
オプションを以下に示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2684
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2685
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2686
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2687
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2688
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2689
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2690
center;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2691
li l li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2692
l li li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2693
li l li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2694
l li li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2695
li l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2696
l l li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2697
li l li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2698
l l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2699
l li l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2700
l l li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2701
li l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2702
li l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2703
l l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2704
li l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2705
li l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2706
l l li
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2707
li l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2708
l l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2709
l l l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2710
l li l
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2711
l li l.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2712
-1.1	-header	-private
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2713
-author	-help	-protected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2714
-bootclasspath	-helpfile	-public
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2715
-bottom	-J	-quiet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2716
-breakiterator	-keywords	-serialwarn
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2717
-charset	-link	-source
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2718
-classpath	-linkoffline	-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2719
-d	-linksource	-splitindex
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2720
-docencoding	-locale	-stylesheetfile
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2721
-docfilessubdirs	-nocomment	-subpackages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2722
-doclet	-nodeprecated	-tag
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2723
-docletpath	-nodeprecatedlist	-taglet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2724
-doctitle	-nohelp	-tagletpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2725
-encoding	-noindex	-title
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2726
-exclude	-nonavbar	-use
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2727
-excludedocfilessubdir	-noqualifier	-verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2728
-extdirs	-nosince	-version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2729
-footer	-notimestamp	-windowtitle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2730
-group	-notree	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2731
	-overview	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2732
	-package	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2733
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2734
.if \n-(b.=0 .nr c. \n(.c-\n(d.-123
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2735
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2736
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2737
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2738
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2739
\f2下線付き\fPで示されたオプションは、Javadoc の基本オプションであり、Javadoc ツールのフロントエンドによって提供され、すべてのドックレットで使用できます。標準ドックレット自体は、下線付きでないオプションを提供します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2740
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2741
.SS "Javadoc のオプション"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2742
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2743
.BI \-overview  " path/filename"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2744
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2745
に対して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2746
.I path/filename 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2747
で指定された「ソース」ファイルから
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2748
概要ドキュメント用のテキスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2749
を取得し、概要ページ (\f3overview-summary.html\f1) に配置することを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2750
指示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2751
.I path/filename 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2752
は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2753
.BR \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2754
への相対パスです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2755
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2756
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2757
.I filename 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2758
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2759
.IR path 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2760
には、それぞれ任意の名前と場所を指定できますが、通常は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2761
.B overview.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2762
という名前を付けて、ソースツリー内の最上位の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2763
パッケージディレクトリを含むディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2764
に配置します。この場所では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2765
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2766
がこのファイルを指すので、パッケージを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2767
ドキュメント化する際に path が必要ありません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2768
たとえば、java.lang パッケージのソースツリーが 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2769
.BR /src/classes/java/lang/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2770
の場合、概要ファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2771
.BR /src/classes/overview.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2772
に配置できます。「使用例」を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2773
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2774
.IR path/filename 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2775
で指定するファイルについては、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2776
「概要コメントファイル」を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2777
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2778
概要ページが作成されるのは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2779
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2780
に 2 つ以上のパッケージ名を渡した場合だけです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2781
詳細は、「HTML フレーム」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2782
節を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2783
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2784
概要ページのタイトルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2785
.B \-doctitle 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2786
によって設定されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2787
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2788
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2789
.B \-public
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2790
public なクラスとメンバだけを表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2791
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2792
.B \-protected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2793
protected および public なクラスとメンバだけを表示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2794
これはデフォルトの動作です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2795
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2796
.B \-package
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2797
パッケージ、および protected と public な
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2798
クラスとメンバだけを表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2799
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2800
.B \-private
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2801
すべてのクラスとメンバを表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2802
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2803
.B \-help
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2804
オンラインヘルプを表示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2805
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2806
とドックレットのコマンド行オプションの一覧が表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2807
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2808
.BI \-doclet  " class"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2809
ドキュメントの生成に使う
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2810
ドックレットを起動するためのクラスファイルを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2811
完全指定の名前を指定してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2812
ドックレットでは、出力の内容と形式を定義します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2813
.B \-doclet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2814
オプションが使われていない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2815
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2816
は標準ドックレットを使ってデフォルトの HTML 形式を生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2817
このクラスには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2818
start(Root) メソッドが含まれていなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2819
この起動クラスへのパスは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2820
.B \-docletpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2821
オプションによって定義されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2822
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2823
たとえば、MIF ドックレットを呼び出すには、次のように指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2824
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2825
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2826
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2827
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2828
    -doclet com.sun.tools.doclets.mif.MIFDoclet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2829
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2830
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2831
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2832
特定のドックレットを実行した完全な例については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2833
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2834
http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2835
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2836
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2837
「\f2Running the MIF Doclet\fP」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2838
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2839
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2840
.BI \-docletpath  " classpathlist"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2841
.B \-doclet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2842
オプションで指定されているドックレットクラスファイル、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2843
およびそれに依存する jar ファイルへのパスを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2844
起動クラスファイルが jar ファイル内にある場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2845
例に従って、その jar ファイルへのパスを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2846
絶対パス、または現在のディレクトリからの相対パスを指定できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2847
.IR classpathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2848
には、複数のパスまたは jar ファイルを含める
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2849
ことができます。その場合、各パスまたは jar ファイルを Solaris ではコロン (\f3:\f1)で、Windows ではセミコロン (;) で区切ります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2850
目的のドックレットの開始クラスがすでに検索パス内にある場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2851
このオプションは不要です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2852
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2853
次の例の jar ファイルへのパスには、ドックレットの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2854
開始クラスファイルが含まれています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2855
jar ファイル名が含まれている点に注意してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2856
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2857
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2858
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2859
   \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2860
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2861
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2862
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2863
次はドックレットの開始クラスファイルのパスの例です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2864
クラスファイル名が省略されていることに注意してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2865
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2866
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2867
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2868
   \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2869
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2870
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2871
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2872
特定のドックレットを実行した完全な例については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2873
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2874
http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2875
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2876
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2877
「\f2Running the MIF Doclet\fP」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2878
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2879
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2880
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2881
.B \-1.1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2882
この機能は、javadoc 1.4 から削除されました。代替の機能は
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2883
存在しません。このオプションは、javadoc 1.1 で生成される
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2884
ドキュメントの外観と機能 (サポートされなくなった、入れ子になったクラスを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2885
含む) を備えたドキュメントを作成するためのものでした。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2886
このオプションが必要であれば、代わ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2887
りに javadoc 1.2 または 1.3 を使用してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2888
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2889
\-source release 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2890
受け付けるソースコードのバージョンを指定します。\f2release\fP には次の値を指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2891
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2892
.TS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2893
;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2894
l l.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2895
1.5	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2896
Javadoc は、JDK 1.5 で導入された総称機能および他の言語機能を含んだコードを受け付けます。-source フラグを指定しないと、コンパイラはデフォルトとして 1.5 の動作をします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2897
T}	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2898
1.4	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2899
Javadoc は、JDK 1.4 で導入された、アサーションを含むコードを受け付けます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2900
T}	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2901
1.3	T{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2902
Javadoc は、JDK 1.3 以降に導入されたアサーション、総称機能、または他の言語機能をサポートしません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2903
T}	
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2904
.TE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2905
.if \n-(b.=0 .nr c. \n(.c-\n(d.-14
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2906
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2907
javac でコードをコンパイルするときに使用した値に対応する \f2release\fP の値を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2908
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2909
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2910
.BI \-sourcepath  " sourcepathlist"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2911
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2912
コマンドにパッケージ名または \-subpackages 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2913
を渡す際に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2914
ソースファイル (.java) 検索用のパスを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2915
.BI sourcepathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2916
には、コロン (\f3:\f1) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2917
で区切った複数のパスを含めることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2918
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2919
ツールは、指定されたパス以下のすべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2920
サブディレクトリを検索します。 このオプションを使って、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2921
ドキュメント化されるソースファイルの位置だけでなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2922
それ自体はドキュメント化されていないが、ドキュメント化
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2923
されているソースファイルから継承されたコメントをもつ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2924
ソースファイルの位置も確認できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2925
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2926
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2927
オプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2928
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2929
コマンドを使ってパッケージ名を指定するときにだけ使用でき、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2930
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2931
コマンドに渡される 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2932
.B .java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2933
ファイルは検索できないことに注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2934
.B .java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2935
ファイルを検索するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2936
そのディレクトリに移動するか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2937
各ファイルの前にそのパスを付けます (「1 つ以上
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2938
のパッケージのドキュメント化」を参照)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2939
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2940
が省略された場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2941
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2942
はクラスパスを使ってソースファイルを検索します (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2943
.B \-classpath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2944
を参照)。 したがって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2945
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2946
のデフォルトは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2947
.B \-classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2948
の値です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2949
.B -classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2950
を省略してパッケージ名を 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2951
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2952
に渡した場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2953
.BR javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2954
は、ソースファイルの現在のディレクトリ (およびサブディレクトリ) を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2955
検索します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2956
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2957
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2958
.I sourcepathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2959
では、ドキュメント化するパッケージ名の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2960
ソースツリーのルートディレクトリを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2961
設定します。たとえば、ソースファイルが次の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2962
場所にある 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2963
.B com.mypackage 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2964
という名前のパッケージをドキュメント化するとします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2965
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2966
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2967
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2968
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2969
/home/user/src/com/mypackage/*.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2970
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2971
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2972
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2973
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2974
この場合、次のようにしてソースパスを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2975
.BR /home/user/src
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2976
、つまり 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2977
.BR com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2978
を含むディレクトリに指定し、それからパッケージ名 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2979
.BR com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2980
を指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2981
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2982
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2983
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2984
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2985
% javadoc \-sourcepath /home/user/src/ com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2986
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2987
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2988
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2989
.LP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2990
これは、ソースパスの値とパッケージ名をつなげて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2991
ドットをスラッシュ (/) に変えると、以下のパッケージのフルパス
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2992
になることに注目すると覚えやすいでしょう。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2993
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2994
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2995
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2996
.BR /home/user/src/com/mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2997
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2998
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2999
2 つのソースパスを指定するには、次のようにします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3000
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3001
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3002
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3003
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3004
% javadoc \-sourcepath /home/user/src/:/home/user2/src com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3005
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3006
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3007
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3008
.LP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3009
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3010
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3011
.BI \-classpath  " classpathlist"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3012
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3013
が参照されるクラスの検索を行うパスを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3014
参照されるクラス (\f3.class\f1) とは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3015
ドキュメント化されるクラスとそれらのクラスによって
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3016
参照される任意のクラスのことです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3017
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3018
は、指定されたパス以下のすべてのサブディレクトリで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3019
検索を行います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3020
.I classpathlist
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3021
には、パス間をコロン (\f3:\f1) で区切って複数のパスを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3022
含めることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3023
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3024
ツールは、指定されたパス以下の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3025
すべてのサブディレクトリを検索します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3026
.IR classpathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3027
の指定
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3028
については、クラスパスのドキュメントを参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3029
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3030
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3031
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3032
を省略した場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3033
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3034
ツールは、クラスファイル (下位互換用) とともに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3035
.B \-classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3036
を使ってソースファイルを検索します。このため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3037
異なるパス内のソースファイルおよびクラスファイルを検索する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3038
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3039
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3040
.BR \-classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3041
の両方を使います。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3042
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3043
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3044
.BR com.mypackage 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3045
をドキュメント化したい場合に、パッケージのクラスがディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3046
.BR /home/user/src/com/mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3047
にあり、このパッケージが 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3048
.BR /home/user/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3049
内のライブラリを使う場合は、次のように指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3050
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3051
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3052
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3053
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3054
% javadoc \-classpath /home/user/lib \-sourcepath /home/user/src com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3055
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3056
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3057
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3058
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3059
ほかのツールと同様に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3060
.BR \-classpath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3061
を指定しない場合は、CLASSPATH 環境変数が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3062
設定されていれば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3063
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3064
ツールはこの環境変数を使います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3065
どちらも設定されていない場合
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3066
は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3067
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3068
ツールは現在のディレクトリでクラスを検索します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3069
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3070
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3071
ツールが拡張機能クラスおよびブートストラップクラスと通信する際に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3072
.B -classpath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3073
を使ってユーザクラスを検索する方法についての
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3074
詳細は、「クラスの検索方法」を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3075
参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3076
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3077
便宜上、\f2*\fP のベース名を含むクラスパス要素は、ディレクトリ内の拡張子 \f2.jar\fP または \f2.JAR\fP を持つすべてのファイルのリストを指定するのと同じであるとみなされます (Java プログラムはこの 2 つの呼び出しを区別できない)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3078
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3079
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3080
たとえば、ディレクトリ \f2foo\fP に \f2a.jar\fP と \f2b.JAR\fP が含まれている場合、クラスパス要素 \f2foo/*\fP は \f2A.jar:b.JAR\fP に展開されます。ただし、JAR ファイルの順番は未定義となります。このリストには、隠しファイルも含め、指定されたディレクトリ内のすべての JAR ファイルが含まれます。\f2*\fP だけから成るクラスパスエントリは、カレントディレクトリ内のすべての JAR ファイルのリストに展開されます。\f2CLASSPATH\fP 環境変数も、定義時には同様に展開されます。クラスパスのワイルドカード展開は必ず、Java 仮想マシンの起動前に実行されます。したがって、\f2System.getenv("CLASSPATH")\fP 呼び出しなどの環境に対する問い合わせを行わない限り、展開されていないワイルドカードを Java プログラムが認識することはありません。  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3081
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3082
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3083
\-subpackages\ \ package1:package2:... 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3084
ソースファイルから指定されたパッケージおよびそのサブパッケージ内に再帰的にドキュメントを生成します。このオプションは、ソースコードに新しいサブパッケージを追加する際に便利です。新しいサブパッケージは自動的に組み込まれます。各 package 引数は、任意の最上位サブパッケージ (java など) または完全指定のパッケージ (javax.swing など) になります。ソースファイルを含める必要はありません。引数は、コロンで区切られます (すべてのオペレーティングシステム)。ワイルドカードは不要です (使用不可)。パッケージの検索場所を指定するには、\-sourcepath を使用します。このオプションは、「ソースファイルの処理」で説明したとおり、ソースツリーにあるがパッケージには属していないソースファイルを処理しないので役立ちます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3085
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3086
次に例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3087
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3088
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3089
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3090
  % \fP\f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax.swing\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3091
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3092
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3093
このコマンドは、「java」および「javax.swing」という名前のパッケージとこれらのサブパッケージ全部のドキュメントを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3094
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3095
\f2\-exclude\fP とともに \f2\-subpackages\fP を使用すると、特定のパッケージを除外できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3096
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3097
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3098
\-exclude\ \ packagename1:packagename2:... 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3099
指定されたパッケージとそのサブパッケージを \f2\-subpackages\fP によって作成されたリストから無条件に除外します。過去の \f2\-subpackages\fP オプションの指定によって組み込まれたパッケージ、または将来組み込まれるパッケージも除外の対象となります。次に例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3100
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3101
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3102
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3103
  % \fP\f3javadoc \-sourcepath /home/user/src \-subpackages java \-exclude java.net:java.lang\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3104
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3105
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3106
このうち、\f2java.io\fP、\f2java.util\fP、\f2java.math\fP は組み込まれますが、\f2java.net\fP と \f2java.lang\fP 以下のパッケージは除外されます。ただし、\f2java.lang\fP のサブパッケージである \f2java.lang.ref\fP は除外されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3107
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3108
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3109
.BI \-bootclasspath  " classpathlist"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3110
ブートクラスが存在するパスを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3111
ブートクラスとは、Java プラットフォームクラスのことです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3112
.B bootclasspath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3113
は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3114
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3115
ツールがソースファイルとクラスファイルを探すときに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3116
使う検索パスの一部です。詳細は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3117
「Javac と Javadoc がクラスを検索する方法」 を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3118
参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3119
.I classpathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3120
内の複数の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3121
クラスパスリストは、コロン (:) で区切ります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3122
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3123
.BI \-extdirs  " dirlist"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3124
拡張機能クラスが存在するディレクトリを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3125
拡張機能クラスは、Java 拡張機能
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3126
機構を使うすべてのクラスです。拡張機能ディレクトリ (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3127
.B extdirs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3128
) は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3129
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3130
ツールがソースファイルとクラスファイルを探すときに使う検索パスの一部です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3131
詳細は、上の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3132
.B \-classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3133
を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3134
.I dirlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3135
内の複数のディレクトリは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3136
コロン (:) で区切ります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3137
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3138
.B \-verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3139
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3140
の実行中に詳細なメッセージを表示します。冗長オプションを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3141
指定しない場合は、ソースファイルのロード時、ドキュメントの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3142
生成時 (ソースファイルごとに 1 つのメッセージ)、およびソート時に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3143
メッセージが表示されます。冗長オプションを指定した場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3144
各 java ソースファイルの解析に要したミリ秒数などの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3145
追加メッセージを表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3146
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3147
.BI \-quiet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3148
エラーメッセージ以外、および警告メッセージ以外の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3149
メッセージを除外し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3150
エラーメッセージおよび警告メッセージだけを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3151
表示して見つけやすくします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3152
また、バージョン文字列の表示も抑制します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3153
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3154
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3155
\-breakiterator\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3156
英語言語というロケール固有のアルゴリズムではなく、\f2java.text.BreakIterator\fP の国際化された文境界を使用して、英文の最初の文の終わりを判断します (他のすべてのロケールはすでに \f2BreakIterator\fP を使用)。「\f2最初の文\fP」とは、パッケージ、クラス、またはメンバの主説明での最初の文のことです。この文は、パッケージ、クラス、またはメンバの要約にコピーされ、アルファベット順のインデックスにコピーされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3157
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3158
JDK 1.2 以降、BreakIterator クラスは、英語を除くすべての言語の文の終わりを判断するために、すでに使用されています。したがって、1.2 以降では、\f2\-breakiterator\fP オプションは英文以外には効果がありません。英文には、次のような独自のデフォルトのアルゴリズムがあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3159
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3160
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3161
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3162
英文のデフォルトの文区切りアルゴリズム \- 空白または HTML ブロックタグ (\f2<P>\fP など) が続くピリオドで停止する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3163
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3164
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3165
breakiterator 文区切りアルゴリズム \- 一般に、次の語が大文字で始まる場合、空白文字が続くピリオド、疑問符、または感嘆符で停止する。このアルゴリズムでは、ほとんどの省略表記が処理される (「The serial no. is valid」は処理されるが「Mr. Smith」は処理されない)。HTML タグや、数字または記号で始まる文では停止しない。HTML タグに埋め込まれている場合でも、「../filename」の最後のピリオドで停止する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3166
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3167
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3168
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3169
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3170
注: 1.5.0 からは、1.4.x に設けられていた breakiterator 警告メッセージを削除し、デフォルトの文区切りアルゴリズムを変更していません。つまり、\-breakiterator オプションは、1.5.0 ではデフォルトではなくなり、またデフォルトにするつもりもありません。これは、「次のメジャーリリース」(1.5.0) でデフォルトを変更するという、以前の目的とは逆になっています。つまり、ソースコードを変更せず、1.4.x での breakiterator 警告を除去していない場合でも、1.5.0 からは何もする必要がなく、警告は消滅しています。この逆戻りの理由は、breakiterator をデフォルトにするメリットよりも、デフォルトにするために必要となる、互換性のないソースの変更の方が負担が大きかったためです。これに費やした作業や混乱が無駄になり残念です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3171
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3172
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3173
.BI \-locale  " language_country_variant"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3174
.B 重要: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3175
\-locale オプションは、標準ドックレットやその他のドックレット
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3176
によって提供されるオプションよりも前に (左側に) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3177
指定する必要があります。そうでなければ、ナビゲーションバーは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3178
英語で表示されます。順序に依存するコマンド行オプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3179
このオプションのみです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3180
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3181
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3182
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3183
がドキュメントを生成するときに使うロケールを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3184
引数には、java.util.Locale のドキュメントで説明されている
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3185
ロケールを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3186
たとえば、en_US (英語、米国)、en_US_WIN (Windows で使われる英語) などを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3187
指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3188
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3189
ロケールを指定すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3190
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3191
は指定されたロケールのリソースファイルを選択して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3192
メッセージ (ナビゲーションバー、リストと表の見出し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3193
ヘルプファイルの目次、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3194
.BR stylesheet.css 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3195
のコメントなどの文字列) に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3196
使います。また、アルファベット順にソートされるリストのソート順、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3197
および最初の文の末尾を決定する文の区切り文字も、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3198
指定したロケールによって決まります。このオプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3199
ドキュメント化されるクラスのソースファイル内で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3200
指定されている doc コメントテキストの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3201
ロケールを決定するものではありません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3202
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3203
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3204
.BI \-encoding  " name"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3205
ソースファイルのエンコーディング名 (EUCJIS/SJIS など) を指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3206
このオプションが指定されていない場合は、プラットフォームの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3207
デフォルトコンバータが使われます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3208
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3209
\-docencoding および \-charset も参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3210
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3211
.BI \-J flag
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3212
.BR javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3213
を実行する実行システム java に flag を直接渡します。J と flag の間に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3214
空白を入れてはなりません。たとえば、生成される
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3215
ドキュメントを処理するために、システムで 32M バイトを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3216
確保する必要がある場合は、Java の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3217
.B \-Xmx
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3218
オプションを次のように呼び出します。\-Xms はオプションです。初期メモリのサイズのみを設定するため、必要な最小メモリを知っている場合に便利です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3219
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3220
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3221
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3222
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3223
% javadoc \-J\-Xmx32m \-J\-Xms32m com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3224
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3225
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3226
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3227
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3228
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3229
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3230
使用している javadoc のバージョンを確認するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3231
次のように java の「-version」オプションを呼び出します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3232
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3233
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3234
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3235
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3236
% javadoc -J-version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3237
java version "1.2"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3238
Classic VM (build JDK-1.2-V, green threads, sunwjit)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3239
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3240
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3241
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3242
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3243
(標準ドックレットのバージョン番号は出力ストリームに表示されます。) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3244
.SS "標準ドックレットが提供するオプション"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3245
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3246
.BI \-d  " directory"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3247
生成された HTML ファイルを保存するディレクトリを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3248
指定します (d は「生成先 (destination)」の意味)。このオプションを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3249
省略すると、生成されたファイルは現在のディレクトリに保存されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3250
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3251
.I directory 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3252
には、絶対ディレクトリまたは現在の作業
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3253
ディレクトリからの相対ディレクトリを指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3254
1.4 では、javadoc の実行時に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3255
自動的に生成先ディレクトリが作成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3256
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3257
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3258
次の例は、com.mypackage パッケージのドキュメントを生成し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3259
結果を 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3260
.B /home/user/doc/ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3261
ディレクトリに保存します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3262
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3263
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3264
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3265
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3266
% javadoc \-d /home/user/doc com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3267
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3268
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3269
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3270
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3271
.B \-use
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3272
ドキュメント化されるクラスとパッケージごとに 1 つの [使用] ページを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3273
含めます。このページには、ドキュメント化されるクラスまたは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3274
パッケージの API を使っているパッケージ、クラス、メソッド、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3275
コンストラクタ、およびフィールドが記述されます。たとえば、クラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3276
C およびクラス C を使うものは、C のサブクラス、C として
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3277
宣言されているフィールド、C を返すメソッド、および、型 C の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3278
パラメータを持つメソッドとコンストラクタがページに含ま
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3279
れます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3280
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3281
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3282
たとえば、String について、[使用] ページに何が表示されるかを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3283
見てみましょう。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3284
.B java.awt.Font 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3285
クラスの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3286
.B getName() 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3287
メソッドは、String 型を返します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3288
このため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3289
.B getName() 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3290
は String を使うので、[使用] ページの String で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3291
このメソッドを見つけることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3292
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3293
このページでは API の使用だけがドキュメント化され、実装はドキュメント化されません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3294
あるメソッドが実装内に String を使っているが、引数として
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3295
文字列をとったり、文字列を返したりしない
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3296
場合は、String の「使用」とはみなされません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3297
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3298
生成された [使用] ページにアクセスするには、目的のクラスまたは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3299
パッケージを表示して、ナビゲーションバーの [使用] リンクを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3300
クリックします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3301
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3302
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3303
.B \-version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3304
生成されるドキュメントに 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3305
.B @version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3306
テキストを含めます。このテキストは、デフォルトでは省略されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3307
使用している javadoc ツールのバージョンを確認するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3308
.B \-J\-version 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3309
オプションを使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3310
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3311
.B \-author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3312
生成されるドキュメントに 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3313
.B @author
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3314
テキストを含めます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3315
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3316
.B \-splitindex
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3317
索引ファイルをアルファベットごとに複数のファイルに分割し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3318
文字ごとに 1 つのファイルと、アルファベット以外の文字で始まる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3319
索引エントリ用のファイルを 1 つ作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3320
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3321
.BI \-windowtitle  " title"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3322
HTML の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3323
.B <title>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3324
タグで使うタイトルを指定します。指定したタイトルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3325
ウィンドウタイトルと、該当するページに対して作成されたブラウザの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3326
ブックマーク (よくアクセスする場所) に表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3327
タイトルには HTML タグを含めないでください。タイトルに HTML タグが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3328
含まれていると、ブラウザによるタグの解釈が不適切になる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3329
可能性があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3330
.I title 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3331
の中で引用符を使う場合は、引用符を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3332
エスケープする必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3333
.B -windowtitle 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3334
が省略されている場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3335
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3336
ツールはこのオプションの代わりに -doctitle の値を使います。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3337
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3338
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3339
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3340
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3341
% javadoc -windowtitle "Java 2 Platform" com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3342
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3343
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3344
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3345
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3346
.BI \-doctitle  " title"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3347
概要ファイルの最上部近くに配置するタイトルを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3348
タイトルは中央揃えされ、レベル 1 の見出しとして上部
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3349
ナビゲーションバーのすぐ下に置かれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3350
.I title 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3351
には、HTML タグと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3352
空白を含めることができますが、これらを含める場合は全体を引用符で囲
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3353
まなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3354
.I title 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3355
の中で引用符を使う場合は、引用符をエスケープする必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3356
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3357
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3358
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3359
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3360
% javadoc -doctitle "Java<sup><font size=\"-2\">TM</font></sup>" com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3361
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3362
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3363
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3364
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3365
.BI \-title  " title"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3366
このオプションは、現在は存在しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3367
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3368
1.2 のベータ版にだけ存在しました。このオプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3369
ウィンドウタイトルではなくドキュメントタイトルを定義することを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3370
明確にするため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3371
.BR \-doctitle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3372
に名前が変更されました。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3373
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3374
.BI \-header  " header"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3375
各出力ファイルの上部に配置するヘッダテキストを指定します。ヘッダは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3376
上部ナビゲーションバーの右側に配置されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3377
.I header 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3378
には、HTML タグと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3379
空白を含めることができますが、これらを含める場合は全体を引用符で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3380
囲まなければなりません。header の中で引用符を使う場合は、引用符を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3381
エスケープする必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3382
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3383
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3384
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3385
  % \fP\f3javadoc \-header "<b>Java 2 Platform </b><br>v1.4" com.mypackage\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3386
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3387
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3388
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3389
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3390
.BI \-footer  " footer"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3391
各出力ファイルの下部に配置するフッタテキストを指定します。フッタは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3392
下部ナビゲーションバーの右側に配置されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3393
.I footer 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3394
には、HTML タグと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3395
空白を含めることができますが、これらを含める場合は全体を引用符で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3396
囲まなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3397
.I footer 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3398
の中で引用符を使う場合は、引用符をエスケープする必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3399
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3400
.BI \-bottom  " text"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3401
各出力ファイルの最下部に配置するテキストを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3402
このテキストは、下部ナビゲーションバーの下のページの最下部に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3403
配置されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3404
.I text 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3405
には、HTML タグと空白を含めることができますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3406
これらを含める場合は全体を引用符で囲まなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3407
.I text 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3408
の中で引用符を使う場合は、引用符をエスケープする必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3409
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3410
.BI \-link  " extdocURL"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3411
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3412
ツールにより生成された既存の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3413
外部参照クラスのドキュメンテーションへのリンクを作成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3414
引数は 1 つです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3415
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3416
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3417
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3418
は、javadoc によって生成され、リンク先として指定する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3419
外部ドキュメントがあるディレクトリの絶対 URL または相対 URL です。 あとで例を示します。 このディレクトリ内に package-list ファイルが存在して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3420
いなければなりません。存在しない場合は、\-linkoffline を使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3421
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3422
ツールは package-list ファイルからパッケージ名を読み取り、それを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3423
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3424
のパッケージにリンクします。 javadoc ツールを実行すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3425
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3426
値は作成された <A HREF> リンクにそのままコピーされます。 したがって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3427
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3428
はファイルではなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3429
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3430
の URL である必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3431
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3432
ドキュメントを任意の Web サイト上のドキュメントにリンクするには 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3433
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3434
の絶対リンクを、相対ロケーションだけを指定するには
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3435
相対リンクを使用できます。相対リンクを使用する場合、生成先ディレクトリ (\-d で指定) からの相対パスを、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3436
リンク先パッケージがあるディレクトリに渡す必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3437
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3438
通常、絶対リンクを指定する場合は、http: リンクを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3439
ただし、Web サーバをもたないファイルシステムに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3440
リンクする場合は、file: リンクを使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3441
ただし、この方法は、生成されたドキュメントに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3442
アクセスしようとする
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3443
すべてのユーザが同じファイルシステムを共有している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3444
場合以外は使用しないでください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3445
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3446
すべての場合、すべてのオペレーティングシステムで、絶対 URL と相対 URL、「http:」ベースと「file:」ベースにかかわらず、スラッシュを区切り文字として使用します 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3447
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3448
(http://www.ietf.org/rfc/rfc1738.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3449
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3450
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3451
\f2URL Memo\fP で指定)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3452
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3453
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3454
http: ベースの絶対リンク: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3455
\f2\-link http://<host>/<directory>/<directory>/.../<name>\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3456
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3457
file: ベースの絶対リンク: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3458
\f2\-link file://<host>/<directory>/<directory>/.../<name>\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3459
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3460
相対リンク: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3461
\f2\-link <directory>/<directory>/.../<name>\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3462
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3463
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3464
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3465
javadoc 実行時に複数の \-link オプションを指定して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3466
複数のドキュメントへのリンクを作成することもできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3467
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3468
\-linkoffline または \-link の選択 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3469
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3470
\-link を使用する場合: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3471
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3472
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3473
外部 API ドキュメントへの相対パスを使用している 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3474
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3475
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3476
外部 API ドキュメントへの絶対 URL を使用している (プログラムがその URL に接続し、読み取りを行うことが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3477
シェルによって許可されている場合) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3478
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3479
\-linkoffline を使用する場合: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3480
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3481
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3482
外部 API ドキュメントへの絶対 URL を使用している 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3483
(プログラムがその URL に接続し、読み取りを行うことが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3484
シェルによって許可されていない場合)。このような状況は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3485
リンク先のドキュメントがファイアウォールの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3486
向こう側にある場合に発生します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3487
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3488
外部ドキュメントへの絶対リンクの使用例 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3489
java.lang、java.io、および他の Java 2 プラットフォームパッケージ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3490
(\f2http://java.sun.com/j2se/1.5.0/docs/api\fP) に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3491
リンクしたい場合があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3492
次のコマンドは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3493
Java 2 プラットフォームパッケージへのリンクを持つ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3494
com.mypackage パッケージのドキュメントを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3495
生成されたドキュメントには、たとえばクラスツリー内の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3496
Object クラスへのリンクが含まれています
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3497
(\-sourcepath や \-d などの他のオプションは表示されません)。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3498
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3499
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3500
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3501
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3502
% \fP\f3javadoc \-link http://java.sun.com/j2se/1.5.0/docs/api com.mypackage\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3503
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3504
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3505
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3506
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3507
外部 ドキュメントへの相対リンクの使用例 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3508
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3509
ツールの異なる実行で生成されたドキュメントを持つ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3510
2 つのパッケージがあり、それらが別々の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3511
相対パスをもっているとします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3512
この例では、2 つのパッケージを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3513
com.apipackage (API)、com.spipackage 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3514
(SPI - Service Provide Interface) とします。 ドキュメントの置き場所は docs/api/com/apipackage および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3515
docs/spi/com/spipackage です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3516
API パッケージドキュメントはすでに生成され、ドキュメントが現在の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3517
ディレクトリ内にある場合、次のように実行することで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3518
API ドキュメントにリンクした SPI パッケージをドキュメント化できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3519
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3520
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3521
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3522
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3523
% javadoc \-d ./spi \-link ../api com.spipackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3524
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3525
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3526
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3527
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3528
\-link 引数が生成先ディレクトリの相対パス (docs/spi) で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3529
あることに注意してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3530
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3531
詳細 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3532
\-link オプションを使うと、コードからは参照されていても、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3533
Javadoc の現在の実行ではドキュメント化されないクラスにリンク
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3534
できるようになります。 リンクから有効なページに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3535
移動できるようにするには、それらの HTML ページが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3536
ある場所を調べ、その場所を 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3537
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3538
に指定する必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3539
このオプションを使うと、たとえば、サードパーティのドキュメントから、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3540
http://java.sun.com にある java.* のドキュメントにリンクすることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3541
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3542
今回の実行で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3543
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3544
によって生成されるドキュメント内の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3545
API だけを対象にリンクを作成する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3546
\-link オプションを省略します。 \-link オプションが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3547
指定されていない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3548
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3549
ツールは、外部参照されたドキュメントへのリンクを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3550
作成しません。これは、そのドキュメントが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3551
存在するかどうか、あるいは存在していてもどこに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3552
存在しているのかを判別できないからです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3553
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3554
このオプションは、生成ドキュメント内の複数の場所に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3555
リンクを作成できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3556
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3557
また、このオプションを使うと、複数のパッケージ群の間にクロスリンクを作成することもできます。つまり、ある一式のパッケージに対して javadoc を実行したあと、別の一式のパッケージに対して javadoc を実行し、これら 2 つのパッケージ群の間にクロスリンクを作成できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3558
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3559
\f3クラスの参照方法\fP - 外部参照クラスへのリンクを、テキストラベルだけではなく実際に表示するには、次の方法でクラスを参照する必要があります。メソッドの本体でクラスを参照するだけでは十分ではありません。\f2import\fP 文または宣言で参照する必要があります。次に、クラス \f2java.io.File\fP を参照する方法の例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3560
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3561
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3562
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3563
すべての種類の \f2import\fP 文の場合: ワイルドカードによるインポート、名前による明示的なインポート、または \f2java.lang.*\fP に対する自動的なインポート。たとえば、次のようにすれば十分です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3564
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3565
\f2import java.io.*;\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3566
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3567
1.3.x および 1.2.x では、名前による明示的なインポートだけです。ワイルドカードによるインポート文も、自動インポート \f2java.lang.*\fP も使用できません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3568
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3569
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3570
宣言の場合:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3571
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3572
\f2void foo(File f) {}\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3573
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3574
この参照を使用し、メソッド、コンストラクタ、フィールド、クラス、またはインタフェースのリターンタイプまたはパラメータタイプに置くか、\f2implements\fP、\f2extends\fP、または \f2throws\fP 文に置きます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3575
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3576
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3577
この結果、\f2\-link\fP オプションを使用しても、この制限のために誤って表示されない多くのリンクが多数発生する可能性があります。テキストはハイパーテキストリンクが付けられずに表示されます。これらのリンクが表示する警告から、このリンクを認識できます。クラスを正しく参照し、それによってリンクを追加するためのもっとも安全な方法は上で説明したとおり、当該のクラスをインポートすることです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3578
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3579
.B パッケージリスト: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3580
.B \-link
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3581
オプションでは、javadoc ツールによって生成された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3582
.BR package-list 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3583
という名前のファイルが、このオプションで指定する URL に存在している
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3584
必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3585
.BR package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3586
ファイルは、その場所でドキュメント化されているパッケージの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3587
名前のリストを含む単純なテキストファイルです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3588
前の例では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3589
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3590
ツールは、指定された URL にある 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3591
.BR package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3592
という名前のファイルを探し、パッケージ名を読み込んで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3593
その URL にあるそれらのパッケージへのリンクを作成しました。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3594
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3595
たとえば、Java プラットフォーム v5.0 API のパッケージリストは以下にあり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3596
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3597
\f2http://java.sun.com/j2se/1.5.0/docs/api/package\-list\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3598
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3599
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3600
次のような内容で始まっています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3601
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3602
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3603
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3604
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3605
java.applet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3606
java.awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3607
java.awt.color
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3608
java.awt.datatransfer
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3609
java.awt.dnd
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3610
java.awt.event
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3611
java.awt.font
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3612
その他 ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3613
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3614
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3615
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3616
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3617
.B \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3618
オプションを指定せずに 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3619
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3620
ツールを実行した場合、ドキュメントの生成時に外部参照
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3621
クラスに属する名前を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3622
見つけると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3623
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3624
はその名前をリンクを持たない形で出力します。一方、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3625
.B \-link
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3626
オプションが指定されている場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3627
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3628
ツールは、指定された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3629
.IR extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3630
の場所にある 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3631
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3632
ファイルから、該当する名前のパッケージを探します。パッケージ名が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3633
見つかった場合は、その
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3634
.IR extdocURL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3635
を名前の前に付けます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3636
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3637
すべてのリンクが正しく機能するためには、外部参照の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3638
ドキュメントのすべてが、指定された URL に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3639
存在していなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3640
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3641
ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3642
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3643
が存在するかどうかを調べるだけで、指定された URL に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3644
目的のページが存在するかどうかはチェックしません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3645
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3646
.B 複数のリンク: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3647
複数の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3648
.B \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3649
オプションを提供して、外部で生成されたドキュメントに任意数のリンクを設定できます。Javadoc 1.2 には、複数の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3650
.B -link
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3651
コマンドを提供できないというバグがあります。このバグは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3652
1.2.2 で修正されました。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3653
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3654
リンクする外部ドキュメントごとに別のリンクオプションを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3655
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3656
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3657
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3658
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3659
% javadoc \-link extdocURL1 \-link extdocURL2 ... \-link extdocURLn com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3660
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3661
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3662
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3663
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3664
.BR extdocURL1、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3665
.BR extdocURL2、... 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3666
.BR extdocURLn 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3667
は、それぞれ外部ドキュメントの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3668
ルートを指し、各ルートには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3669
.BR package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3670
という名前のファイルが含まれています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3671
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3672
クロスリンク - まだ生成されていない 2 つ以上のドキュメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3673
クロスリンクする場合は、「ブートストラッピング」が必要になることに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3674
注意してください。言い換えると、どのドキュメントの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3675
.B package-list 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3676
も存在していない場合、最初のドキュメントに対して 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3677
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3678
ツールを実行した時点では、2 番目のドキュメントの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3679
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3680
はまだ存在していません。したがって、外部リンクを作成するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3681
2 番目のドキュメントを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3682
生成したあと、最初のドキュメントを生成し直す必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3683
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3684
この場合、最初に行うドキュメント生成の目的は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3685
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3686
を作成することです。パッケージ名をすべて把握している場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3687
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3688
を手動で作成することもできます。次に、2 番目のドキュメントと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3689
その外部リンクを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3690
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3691
ツールは、必要な外部の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3692
.B package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3693
ファイルが存在しない場合は、警告を表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3694
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3695
.BI \-linkoffline  " extdocURL  packagelistLoc"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3696
このオプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3697
.BR \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3698
オプションを変えたものです。どちらも、javadoc で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3699
生成された外部参照クラスのドキュメントへのリンクを作成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3700
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3701
ツールが「オフライン」で、Web 上のドキュメントに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3702
リンクする場合は、Web 接続経由ではドキュメントに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3703
アクセスできないため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3704
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3705
オプションを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3706
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3707
厳密には、外部ドキュメントの \f2package\-list\fP ファイルにアクセスできないとき、またはこのファイルが \f2extdocURL\fP で指定された場所とは異なる場所 (通常、\f2packageListLoc\fP で指定可能なローカルな場所) に存在するとき、\f2\-linkoffline\fP を使用します。したがって、\f2extdocURL\fP に WWW 上でしかアクセスできない場合は、\f2\-linkoffline\fP を指定することにより、ドキュメントの生成時に javadoc ツールが Web に接続できなければならないという制約がなくなります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3708
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3709
さらに、ドキュメントを更新するための「ハッキング」としての使用も可能です。パッケージのセット全体に対して javadoc を実行したあと、変更した一部のパッケージだけに対して javadoc を実行します。こうして、更新されたファイルを、オリジナルのファイルセットに挿入できるようにします。例をあとで示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3710
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3711
.BR \-linkoffline
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3712
オプションには 2 つの引数があります。1 つは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3713
<a href> リンクに埋め込む文字列、もう 1 つは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3714
.BR package-list:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3715
の検索場所を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3716
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3717
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3718
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3719
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3720
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3721
は、\f3javadoc\f1 によって生成され、リンク先として指定する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3722
外部ドキュメントがあるディレクトリの絶対 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3723
URL または相対 URL です。 相対リンクの場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3724
生成先ディレクトリ (\-d で指定) からの相対パスを、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3725
リンク先パッケージのルートに渡す必要があります。 詳細は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3726
.B \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3727
オプションの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3728
.I extdocURL 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3729
を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3730
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3731
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3732
.I packagelistLoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3733
には、外部ドキュメントの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3734
.B package-list 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3735
ファイルが入っているディレクトリのパスまたは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3736
URL を指定します。 URL (http: または file:) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3737
またはファイルパスを指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3738
また、絶対パスと相対パスのどちらでもかまいません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3739
相対パスの場合は、javadoc が実行される現在の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3740
ディレクトリからの相対パスとして指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3741
.BR package-list 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3742
というファイル名は含めないでください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3743
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3744
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3745
の 1 回の実行で、複数の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3746
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3747
オプションを指定できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3748
1.2.2 より前のバージョンでは、複数のオプションは指定できませんでした。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3749
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3750
外部ドキュメントへの絶対リンクを使った例 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3751
.BR java.lang
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3752
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3753
.BR java.io
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3754
、およびその他の Java 2 プラットフォームパッケージ (\f2http://java.sun.com/j2se/1.5.0/docs/api\fP)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3755
にリンクしたくても、Web にアクセスできない
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3756
場合について考えてみます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3757
.BR package-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3758
ファイルをブラウザで開き (\f2http://java.sun.com/j2se/1.5.0/docs/api/package\-list\fP)、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3759
ローカルディレクトリに保存します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3760
次に、2 番目の引数
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3761
.I packagelistLoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3762
でそのローカルコピーを指定します。このとき
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3763
パッケージリストファイルは現在のディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3764
「.」に保存されています。 次のコマンドは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3765
Java 2 プラットフォームパッケージへのリンクを含む、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3766
com.mypackage パッケージのドキュメントを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3767
生成されたドキュメントには、たとえばクラスツリー内の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3768
Object クラスへのリンクが含まれています
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3769
(\-sourcepath などの他の必要なオプションは表示されません)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3770
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3771
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3772
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3773
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3774
% \fP\f3javadoc \-linkoffline http://java.sun.com/j2se/1.5.0/docs/api . com.mypackage\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3775
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3776
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3777
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3778
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3779
外部ドキュメントへの相対リンクを使った例 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3780
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3781
を相対パスで指定するのはあまり一般的ではありません。通常は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3782
.B \-link  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3783
で十分だからです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3784
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3785
を使用している場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3786
.BR package-list 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3787
ファイルは通常ローカルで、相対リンクを使用している場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3788
リンク先のファイルもローカルであるのが普通です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3789
そのため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3790
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3791
に 2 つの異なる引数のパスを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3792
与える必要はありません。 2 つの引数が同じである場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3793
.B \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3794
を使用できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3795
.B \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3796
の相対リンクの使用例を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3797
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3798
package-list ファイルの手動作成 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3799
.BR package-list  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3800
ファイルがまだ存在しなくても、ドキュメントのリンク先のパッケージ名がわかっている場合は、このファイルのコピーを自分で作成し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3801
.I packagelistLoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3802
でそのパスを指定することができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3803
com.apipackage が最初に作成されたときに 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3804
com.spipackage のパッケージリストが存在しなかった、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3805
以前の場合がその例です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3806
この方法は、パッケージ名はわかっているものの、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3807
まだ公開されていない、新しい外部ドキュメントにリンクする
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3808
ドキュメントを生成する場合に便利です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3809
また、Javadoc 1.0 または 1.1 では package-list ファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3810
生成されないため、この方法で、これらのバージョンで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3811
生成されたパッケージの package-list ファイルを生成できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3812
2 つの会社が未公開の package-list ファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3813
共有することもできるため、クロスリンクを設定した
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3814
ドキュメントを同時にリリースすることも可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3815
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3816
複数のドキュメントにリンク - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3817
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3818
は、参照先の生成ドキュメントごとに 1 つずつ指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3819
次の例では、わかりやすくするために
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3820
オプションごとに行を分けています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3821
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3822
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3823
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3824
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3825
.ta 18n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3826
% javadoc        \-linkoffline docURL1 packagelistURL1 \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3827
                 \-linkoffline docURL2 packagelistURL2 \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3828
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3829
        ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3830
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3831
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3832
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3833
.B ドキュメントの更新: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3834
.B \-linkoffline 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3835
オプションのもう 1 つの用途は、プロジェクトで多数のパッケージを使い、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3836
すでにツリー全体に対して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3837
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3838
を実行してある場合に、次の実行では、すばやく細かい
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3839
変更を行なってから、ソース
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3840
ツリーの一部に対してだけ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3841
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3842
を実行し直したい場合に便利です。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3843
変更がドキュメンテーションコメントに対し
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3844
てであり、シグニチャに対してではない場合にだけ正常に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3845
処理されるので、ハッキング
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3846
のようなものです。ソースコードに対してシグニチャを追加、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3847
削除または変更した場合は、索引、パッケージツリー、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3848
継承されるメンバのリスト、[使用] ページなどの場所
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3849
で壊れたリンクが表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3850
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3851
まず、新しい実行のため、新規の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3852
生成先ディレクトリ (update) を作成します。オリジナルの生成先ディレクトリを html とします。もっとも簡単な例として、html の親に移動します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3853
.B \-linkoffline  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3854
の 1 番目の引数に現在のディレクトリ「.」を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3855
設定し、2 番目の引数に package-list 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3856
を検索する場所である html への相対パスを設定します。更新したいパッケージのパッケージ名のみを渡します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3857
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3858
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3859
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3860
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3861
% javadoc \-d update \-linkoffline . html com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3862
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3863
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3864
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3865
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3866
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3867
の実行が終了したとき、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3868
.B update/com/package
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3869
内に生成されたクラス (概要や索引ではない) で、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3870
html/com/package 内にあるオリジナルのファイルを上書きコピーします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3871
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3872
\-linksource
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3873
各ソースファイル (行番号付き) の HTML バージョンを作成し、標準 HTML ドキュメントからソースファイルへのリンクを追加します。リンクは、ソースファイル内に宣言されているクラス、インタフェース、コンストラクタ、メソッド、フィールドに対して作成されます。デフォルトコンストラクタ、生成されたクラスに対しては作成されません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3874
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3875
\f3このオプションは、\fP\f4\-public\fP\f3、\fP\f4\-package\fP\f3、\fP\f4\-protected\fP\f3、\fP\f4\-private\fP\f3 の各オプションとは関係なく、非公開のクラス、フィールド、非公開のメソッドの本体をはじめとする組み込まれたソースファイル内の\fP\f4すべての\fP\f3非公開実装の詳細を公開します。\fP\f2\-private\fP オプションを指定しないかぎり、非公開のクラスやインタフェースの一部には、リンクを介してアクセスできないことがあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3876
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3877
各リンクは、その宣言内の識別子名の上に作成されます。たとえば、\f2Button\fP クラスのソースコードヘのリンクは、「Button」という語の上に作成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3878
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3879
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3880
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3881
    public class Button
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3882
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3883
    extends Component
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3884
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3885
    implements Accessible
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3886
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3887
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3888
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3889
Button クラスの \f2getLabel()\fP メソッドのソースコードへのリンクは、「getLabel」という語の上に作成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3890
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3891
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3892
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3893
    public String getLabel()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3894
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3895
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3896
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3897
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3898
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3899
.BI \-group  " groupheading  packagepattern:packagepattern:..."
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3900
概要ページの複数のパッケージを指定のグループに分け、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3901
グループ単位で表を作成
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3902
します。各グループは、それぞれ別の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3903
.B \-group
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3904
オプションで指定します。これらのグループは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3905
コマンド行で指定した順序でページに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3906
表示されます。パッケージは、1 つのグループ内では
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3907
アルファベット順に並べられます。各 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3908
.B \-group
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3909
オプションでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3910
.I packagepattern 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3911
式のリストに一致する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3912
パッケージが、見出し 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3913
.IR groupheading 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3914
を持つ 1 つの表にまとめて表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3915
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3916
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3917
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3918
.I groupheading 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3919
には任意のテキストを指定でき、空白を含めることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3920
指定したテキストは、グループの表見出しになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3921
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3922
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3923
.I packagepattern 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3924
には、任意のパッケージ名、または任意のパッケージ名の先頭部分とそれに続く 1 つのアスタリスク (*)を指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3925
アスタリスクは、「任意の文字に一致する」という意味のワイルドカードです。ワイルドカードとして許容されるのは、アスタリスクだけです。1 つのグループには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3926
コロン (:) で区切った複数のパターンを含めることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3927
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3928
注: パターンやパターンリスト内でアスタリスクを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3929
使う場合は、"java.lang*:java.util" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3930
のように、パターンリストを引用符で囲む必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3931
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3932
.B \-group 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3933
オプションが 1 つも指定されていない場合は、すべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3934
パッケージが、[パッケージ] 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3935
という見出しを持つ 1 つのグループに入れられます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3936
ドキュメント化されるパッケージの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3937
中に、指定したグループのどのグループにも入らない
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3938
パッケージがある場合、このような
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3939
パッケージは [その他のパッケージ] という見出しを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3940
持つ独立したグループに入れられます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3941
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3942
たとえば、次のようにオプションを指定すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3943
ドキュメント化される 4 つのパッケージは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3944
コアパッケージ、拡張機能パッケージ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3945
およびその他のパッケージに分かれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3946
\f3java.lang*\f1 では、後続のドットがないことに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3947
注意してください。\f3java.lang.*\f1 のようにドットを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3948
入れると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3949
.B java.lang 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3950
パッケージは含まれないことになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3951
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3952
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3953
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3954
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3955
% javadoc \-group "Core Packages" "java.lang*:java.util" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3956
          \-group "Extension Packages" "javax.*" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3957
          java.lang java.lang.reflect java.util javax.servlet java.new
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3958
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3959
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3960
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3961
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3962
この結果、次のようなグループ化が行われます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3963
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3964
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3965
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3966
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3967
Core Packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3968
  java.lang
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3969
  java.lang.reflect
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3970
  java.util
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3971
Extension Packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3972
  javax.servlet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3973
Other Packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3974
  java.new
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3975
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3976
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3977
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3978
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3979
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3980
.B \-nodeprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3981
推奨されない API をドキュメントに生成することを禁止します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3982
これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3983
.B \-nodeprecatedlist
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3984
オプションを指定した場合の動作に加えて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3985
ドキュメントのほかの部分を通じて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3986
推奨されない API を生成しないことと同じです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3987
このオプションは、コードを記述していて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3988
推奨されないコードを無視したい場合に便利です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3989
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3990
.B \-nodeprecatedlist
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3991
推奨されない API のリストを含む
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3992
ファイル (\f3deprecated-list.html\f1) の生成を禁止
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3993
します。また、このページへのリンクを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3994
ナビゲーションバーに生成することを禁止します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3995
ただし、ドキュメントのほかの部分では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3996
推奨されない API の生成を続行します。この
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3997
オプションは、推奨されない API がソースコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3998
含まれておらず、ナビゲーションバーを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3999
すっきりと見せたい場合に便利です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4000
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4001
.B \-nosince
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4002
生成されるドキュメントから、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4003
.BR @since 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4004
タグに関連した「Since」セクションを削除します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4005
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4006
.B \-notree
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4007
生成されるドキュメントからクラスおよびインタフェース
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4008
階層を省略します。これらのページには、ナビゲーションバーの「ツリー」ボタンからアクセスできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4009
デフォルトでは、階層が作成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4010
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4011
.B \-noindex
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4012
生成されるドキュメントから索引を省略します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4013
デフォルトでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4014
索引が作成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4015
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4016
.B \-nohelp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4017
各出力ページの最上部と最下部の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4018
ナビゲーションバーから [ヘルプ] リンクを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4019
省略します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4020
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4021
.B \-nonavbar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4022
生成されるページの最上部と最下部に表示される
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4023
ナビゲーションバー、ヘッダ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4024
およびフッタの生成を禁止します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4025
このオプションは、bottom オプションには影響しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4026
.B \-nonavbar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4027
オプションは、印刷するためだけに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4028
ファイルを PostScript または PDF に変換する
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4029
場合など、内容だけが重要でナビゲーションの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4030
必要性がない場合に便利です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4031
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4032
.BI \-helpfile  " path/filename"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4033
上部と下部のナビゲーションバーの [ヘルプ] リンクの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4034
リンク先となる代替ヘルプファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4035
.I path/filename 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4036
のパスを指定します。このオプションが指定されていない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4037
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4038
は、javadoc にハードコードされているヘルプファイル 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4039
.B help-doc.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4040
を自動的に作成します。このオプションを使えば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4041
デフォルトの設定をオーバーライドでき
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4042
ます。ファイル名にはどのような
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4043
名前も指定でき、\f3help-doc.html\f1 には限定されま
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4044
せん。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4045
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4046
は、それに従って、ナビゲーションバーにある
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4047
リンクに調整を加えます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4048
次に例を示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4049
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4050
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4051
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4052
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4053
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4054
% javadoc \-helpfile /home/doc/myhelp.html java.awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4055
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4056
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4057
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4058
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4059
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4060
.BI \-stylesheetfile  " path/filename"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4061
代替 HTML スタイルシートファイルのパスを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4062
このオプションが指定されてい
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4063
ない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4064
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4065
ツールは、内部的にハードコードされている
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4066
スタイルシートファイル 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4067
.BR stylesheet.css 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4068
を自動的に作成します。このオプションを使えば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4069
デフォルトの設定をオーバーライドできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4070
filename にはどんなファイル名でも指定でき、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4071
.BR stylesheet.css 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4072
には限定されません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4073
次に例を示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4074
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4075
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4076
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4077
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4078
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4079
% javadoc \-stylesheetfile /home/user/mystylesheet.css com.mypackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4080
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4081
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4082
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4083
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4084
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4085
.B \-serialwarn
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4086
.B @serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4087
タグがない場合、コンパイル時に警告を生成します。デフォルトでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4088
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4089
1.2.2 (およびそれ以降) は 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4090
.B @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4091
の警告を生成しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4092
(これは、以前のバージョンとは逆です。) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4093
.B @serial 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4094
の警告を生成するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4095
このオプションを使用してください。このオプションは、デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4096
直列化可能なフィールドと writeExternal メソッドを正しく
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4097
ドキュメント化するのに役立ちます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4098
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4099
.BI \-charset  " name"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4100
このドキュメント用の HTML 文字セットを指定します。この名前は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4101
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4102
\f2IANA Registry\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4103
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4104
(http://www.iana.org/assignments/character\-sets) で与えられた、推奨される MIME 名でなければなりません。次に例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4105
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4106
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4107
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4108
  % \fP\f3javadoc \-charset "iso\-8859\-1" mypackage\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4109
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4110
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4111
生成されるすべてのページの先頭に、次の行が挿入されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4112
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4113
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4114
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4115
   <META http\-equiv="Content\-Type" content="text/html; charset=ISO\-8859\-1">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4116
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4117
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4118
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4119
この META タグについては、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4120
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4121
http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4122
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4123
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4124
\f2HTML の標準\fP (4197265 および 4137321) を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4125
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4126
\-encoding と \-docencoding も参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4127
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4128
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4129
\-docencoding\  name 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4130
生成される HTML ファイルのエンコーディングを指定します。この名前は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4131
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4132
\f2IANA Registry\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4133
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4134
(http://www.iana.org/assignments/character\-sets) で与えられた、推奨される MIME 名でなければなりません。このオプションを省略しながら \-encoding を使用した場合、生成される HTML ファイルのエンコードは、\-encoding によって決められます。次に例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4135
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4136
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4137
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4138
  % \fP\f3javadoc \-docencoding "ISO\-8859\-1" mypackage\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4139
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4140
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4141
\-encoding および \-charset も参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4142
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4143
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4144
\-keywords 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4145
HTML メタキーワードタグを、クラスごとに生成されるファイルに追加します。これらのタグは、メタタグを検索するサーチエンジンがページを見つける場合に役立ちます。インターネット全体を検索する多くのサーチエンジンは、ページがメタタグを誤用しているため、メタタグを調べません。一方、検索を自身の Web サイトに限定している企業では、サーチエンジンがメタタグを調べることによってメリットを得られます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4146
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4147
メタタグには、クラスの完全修飾名と、フィールドおよびメソッドの修飾されていない名前が含まれます。コンストラクタは、クラス名と同じであるため含まれません。たとえば、クラス String は次のキーワードで開始します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4148
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4149
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4150
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4151
     <META NAME="keywords" CONTENT="java.lang.String class">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4152
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4153
     <META NAME="keywords" CONTENT="CASE_INSENSITIVE_ORDER">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4154
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4155
     <META NAME="keywords" CONTENT="length()">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4156
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4157
     <META NAME="keywords" CONTENT="charAt()">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4158
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4159
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4160
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4161
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4162
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4163
\-tag\ \ tagname:Xaoptcmf:"taghead" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4164
Javadoc ツールがドキュメンテーションコメント内の引数を 1 つ取る単純なカスタムブロックタグ \f2@\fP\f2tagname\fP を解釈できるようにします。これにより、Javadoc ツールはタグ名の「スペルチェック」を行うことができるので、ソースコード内のすべてのカスタムタグに \f2\-tag\fP オプションを組み込むことをお勧めします。今回の実行で出力されないタグは、\f2X\fP を付けて無効にします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4165
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4166
コロン (\f4:\fP) は常に区切り文字になります。\f2tagname\fP でコロンを使用するには、「タグ名でのコロンの使用」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4167
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4168
\f2\-tag\fP オプションは、タグの見出し「\f2taghead\fP」を太字で出力します。その次の行には、このオプションの引数で指定したテキストが続きます。以下の例を参照してください。ブロックタグと同様、この引数のテキストにはインラインタグを含めることができます。このインラインタグも解釈されます。出力は、引数を 1 つ取る標準のタグ (\f2@return\fP、\f2@author\fP など) の出力とよく似ています。\f2taghead\fP を省略すると、\f2tagname\fP が見出しとして表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4169
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4170
\f3タグの配置\fP \- 引数の \f4Xaoptcmf\fP 部分は、ソースコード内のタグを配置できる位置と、\f2X\fP を使ってこのタグを無効にできるかどうかを特定します。タグの配置位置を制限しない場合は \f4a\fP を指定します。それ以外の文字の組み合わせも可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4171
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4172
\f4X\fP (タグの無効化)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4173
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4174
\f4a\fP (すべての位置)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4175
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4176
\f4o\fP (概要)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4177
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4178
\f4p\fP (パッケージ)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4179
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4180
\f4t\fP (型すなわちクラスおよびインタフェース)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4181
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4182
\f4c\fP (コンストラクタ)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4183
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4184
\f4m\fP (メソッド)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4185
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4186
\f4f\fP (フィールド) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4187
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4188
シングルタグの例 -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4189
ソースコードの任意の場所で使用できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4190
タグのタグオプションの例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4191
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4192
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4193
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4194
\-tag todo:a:"To Do:"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4195
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4196
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4197
コンストラクタ、メソッド、およびフィールドだけで @todo を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4198
使用させるには、次のようにします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4199
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4200
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4201
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4202
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4203
\-tag todo:cmf:"To Do:"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4204
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4205
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4206
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4207
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4208
上記では、末尾のコロン (:) がパラメータの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4209
区切り記号ではなく、表示のとおり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4210
見出しテキストの一部であることに注意してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4211
次のように、@todo タグを含むソースコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4212
どちらかのタグオプションを使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4213
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4214
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4215
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4216
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4217
@todo The documentation for this method needs work.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4218
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4219
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4220
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4221
タグ名にコロンを使用する \-
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4222
コロン (:) をバックスラッシュでエスケープすると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4223
コロンをタグ名に使用することができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4224
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4225
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4226
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4227
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4228
* @ejb:bean
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4229
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4230
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4231
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4232
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4233
でこのタグオプションを使用すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4234
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4235
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4236
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4237
\-tag ejb\\:bean:a:"EJB Bean:"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4238
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4239
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4240
となります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4241
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4242
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4243
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4244
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4245
タグ名のスペルチェック (タグの無効化) - 開発者は、ソースコードの中で出力できないカスタムタグを使用することがあります。その場合、ソースタグに存在するすべてのタグをリストし、出力するタグを有効化し、出力しないタグを無効化することが重要です。 X を使用するとタグを無効化でき、これがない場合はタグが有効となります。 この文字の存在によって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4246
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4247
ツールは、検出したタグが未知のタグで、おそらく綴り間違いであると判断できます。 この場合、警告メッセージが表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4248
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4249
すでに存在する、配置を指定する引数の値に X を追加した場合、タグを有効にしたいときに X を削除できます。 たとえば、@todo が出力したくないタグの場合、次のようにします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4250
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4251
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4252
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4253
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4254
\-tag todo:Xcmf:"To Do:"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4255
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4256
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4257
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4258
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4259
または、次のようにより簡単にすることもできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4260
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4261
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4262
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4263
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4264
\-tag todo:X
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4265
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4266
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4267
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4268
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4269
\-tag todo:X の構文は、@todo がタグレットで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4270
定義されている場合も有効です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4271
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4272
タグの順序 -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4273
\-tag (および \-taglet) オプションの順序に従って
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4274
タグが出力されます。 カスタムタグと標準タグを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4275
混在させることができます。 標準タグのタグオプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4276
順序を決定するためだけのプレースホルダです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4277
これらは標準タグ名だけを使用します 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4278
(標準タグの小見出しは変更できません)。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4279
これを次の例に示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4280
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4281
\-tag がない場合、\-taglet の場所によってその順序が決まります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4282
この 2 つが両方ある場合は、コマンド行の最後に使用された方が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4283
順序を決定します (これは、タグとタグレットが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4284
コマンド行で使用された順に処理されるためです)。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4285
たとえば、\-taglet と \-tag が両方とも todo という
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4286
名前である場合、コマンド行の最後で使用された
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4287
方が順序を決定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4288
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4289
タグの完全なセットの例  -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4290
この例では、出力の Parameters と Throws の間に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4291
To Do を挿入します。 「X」を使用して、@example が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4292
ソースコード内の今回の実行で出力されないタグで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4293
あることを指定できます。 @argfile を使用すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4294
次のように行の継続文字なしで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4295
引数ファイルの異なる行にタグを配置できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4296
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4297
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4298
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4299
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4300
\-tag param
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4301
\-tag return
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4302
\-tag todo:a:"To Do:"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4303
\-tag throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4304
\-tag see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4305
\-tag example:X
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4306
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4307
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4308
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4309
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4310
javadoc がドキュメンテーションコメントを解析する際に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4311
検出されたタグのうち、標準タグでもなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4312
\-tag や \-taglet で渡されるタグでもないものは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4313
不明なタグとして認識し、警告がスローされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4314
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4315
標準タグは、最初、デフォルトの順序で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4316
リスト内部的に格納されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4317
\-tag オプションを使用すると、このタグがリストに追加されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4318
標準タグはデフォルトの位置から移動します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4319
そのため、標準タグで \-tag オプションが省略されると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4320
デフォルトの位置に配置されたままになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4321
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4322
競合の回避 -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4323
固有のネームスペースを細かく分けるには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4324
パッケージに使用されている com.mycompany.todo 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4325
という名前のように、ドット (.) を区切り記号とする名前を使います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4326
Sun は今後もドットを含まない標準タグを作成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4327
ユーザが作成したタグは、Sun が定義した同じ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4328
名前のタグの動作をオーバーライドします。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4329
つまり、ユーザが @todo という名前のタグまたは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4330
タグレットを作成していた場合、そのあとで Sun が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4331
同じ名前の標準タグを作成しても、ユーザが定義した
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4332
動作はそのまま維持されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4333
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4334
\f3注釈 vs. Javadoc タグ\fP \- 一般に、追加する必要のあるマークアップが、ドキュメンテーションに影響を与えたりドキュメンテーションを生成したりするためのものである場合、そのマークアップは javadoc タグにすべきです。それ以外の場合は注釈にすべきです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4335
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4336
「\f2Comparing Annotations and Javadoc Tags\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4337
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4338
(http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#annotations) を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4339
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4340
\-taglet オプションを使用して、より複雑な
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4341
スタンドアロンタグやカスタムインラインタグを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4342
作成することができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4343
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4344
\-taglet  class
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4345
タグのドキュメントの生成に使うタグレットを起動するための
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4346
クラスファイルを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4347
クラスの完全修飾名を指定してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4348
このタグレットは、カスタムタグが持っているテキスト引数の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4349
数も定義します。 タグレットはこれらの引数を受け取り、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4350
処理し、出力を生成します。 タグレットの例の詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4351
タグレットの概要を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4352
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4353
タグレットはスタンドアロンタグまたはインラインタグに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4354
使用すると便利です。 タグレットでは任意の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4355
数の引数を持つことができ、カスタムの動作を実装できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4356
たとえば、テキストを太字にしたり、箇条書き形式にしたり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4357
テキストをファイルに書き出したり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4358
他のプロセスを起動したりすることができるのです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4359
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4360
タグレットで指定できるのは、タグの配置場所と配置形式のみです。その他のすべての決定は、ドックレットによって行われます。タグレットを使用しても、包含クラスのリストからクラス名を削除するなどの処理は実行できません。ただし、タグのテキストをファイルに出力したり、別のプロセスをトリガするなどの副作用は得られます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4361
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4362
タグレットへのパスを指定するには、 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4363
.B \-tagletpath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4364
オプションを使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4365
生成されたページの Parameters と Throws の間に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4366
To Do タグレットを挿入する例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4367
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4368
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4369
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4370
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4371
\-taglet com.sun.tools.doclets.ToDoTaglet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4372
\-tagletpath /home/taglets
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4373
\-tag return
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4374
\-tag param
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4375
\-tag todo
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4376
\-tag throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4377
\-tag see
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4378
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4379
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4380
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4381
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4382
.B \-taglet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4383
オプションを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4384
.B \-tag 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4385
オプションの代わりに使用することもできますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4386
その結果、読みにくくなります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4387
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4388
\-tagletpath  tagletpathlist
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4389
taglet クラスファイル (.class) を探すための検索パスを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4390
.I tagletpathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4391
には、コロン (:) で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4392
区切って複数のパスを含めることができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4393
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4394
ツールは、指定されたパス以下のすべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4395
サブディレクトリを検索します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4396
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4397
\-docfilessubdirs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4398
doc-files ディレクトリを、下の階層を含めてコピー
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4399
できるようにします。 つまり、サブディレクトリとすべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4400
コンテンツが、生成先ディレクトリに再帰的にコピーされます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4401
たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4402
.BR doc-files/example/images 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4403
ディレクトリとその中のファイルがコピーされます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4404
サブディレクトリを除外するためのオプションもあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4405
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4406
\-excludedocfilessubdirs  name1:name2:...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4407
doc-files のサブディレクトリで、指定された
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4408
名前のものを除外します。 このオプションを使用すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4409
SCCS およびその他のソースコード管理の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4410
サブディレクトリをコピーしないようにできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4411
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4412
\-noqualifier  all | packagename1:packagename2:...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4413
修飾パッケージ名を、出力のクラス名の前から削除します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4414
\-noqualifier の引数は 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4415
all (すべてのパッケージ修飾子を削除)、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4416
またはコロンで区切られたパッケージリストの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4417
いずれかで、修飾子として削除されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4418
ワイルドカードも使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4419
パッケージ名はクラス名またはインタフェース名が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4420
表示されたところから削除されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4421
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4422
次の例では、すべてのパッケージ修飾子を省略します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4423
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4424
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4425
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4426
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4427
\-noqualifier all
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4428
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4429
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4430
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4431
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4432
次の例では、パッケージ修飾子 java.lang 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4433
および java.io を省略します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4434
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4435
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4436
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4437
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4438
\-noqualifier java.lang:java.io
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4439
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4440
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4441
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4442
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4443
次の例では、java および com.sun から
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4444
始まる (javax を除く) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4445
サブパッケージのパッケージ修飾子を削除します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4446
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4447
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4448
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4449
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4450
\-noqualifier java.*:com.sun.*
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4451
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4452
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4453
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4454
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4455
パッケージ修飾子が上記の動作に従って表示される場合、名前は適切に短くされます。詳細は「名前の表示方法」を参照してください。この規則は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4456
\-noqualifier が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4457
使用されているかどうかにかかわらず存在します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4458
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4459
.BI \-notimestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4460
タイムスタンプが抑制されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4461
各ページ先頭近くにある、生成された HTML 内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4462
HTML コメントでタイムスタンプが隠されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4463
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4464
を 2 つのソースベースで実行し、それらに対して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4465
diff を実行するときにこのオプションを使用すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4466
タイムスタンプによって diff が発生しなくなるので
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4467
便利です (このオプションを使用しないと、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4468
各ページで diff になります)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4469
タイムスタンプには 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4470
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4471
のバージョン番号が含まれており、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4472
次のようになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4473
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4474
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4475
 <!-- Generated by javadoc (build 1.5.0-internal) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4476
 on Tue Jun 22 09:57:24 PDT 2004 -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4477
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4478
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4479
\-nocomment
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4480
記述およびすべてのタグを含むコメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4481
本文全体を抑制し、宣言だけを生成します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4482
このオプションにより、元は異なる目的のためだった
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4483
ソースファイルを再利用し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4484
新しいプロジェクトのためのスケルトンを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4485
作成できるようになりました。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4486
.SS コマンド行引数ファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4487
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4488
のコマンド行を短くしたり簡潔にしたりするために、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4489
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4490
コマンドに対する引数 (\-J オプションを除く) が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4491
入った 1 つ以上のファイルを指定することができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4492
このことを利用すれば、どのオペレーティングシステム
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4493
上でも、任意の長さの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4494
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4495
コマンドを作成できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4496
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4497
引数ファイルには、javac オプションとソースファイル名を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4498
自由に組み合わせて記述できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4499
また、Javadoc オプションに対する引数だけを記述してもかまいません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4500
ファイル内の各引数は、空白文字または改行で区切ります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4501
ファイル名に空白が含まれている場合は、そのファイル名全体を二重引用符で囲む必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4502
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4503
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4504
引数ファイル内のファイル名は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4505
現在のディレクトリから見た相対パスになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4506
引数ファイルの位置から見た相対パスではありません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4507
引数ファイル内のファイル名リストでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4508
ワイルドカード (*) は使用できません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4509
たとえば、*.java とは指定できません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4510
引数ファイル内の引数で @ 文字を使用して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4511
複数のファイルを再帰的に解釈することはサポートされていません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4512
また、\-J オプションもサポートされていません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4513
このオプションは起動ツールに渡されますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4514
起動ツールでは引数ファイルをサポートしていないからです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4515
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4516
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4517
を実行するときに、各引数ファイルのパスとファイル名の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4518
先頭に @ 文字を付けて渡します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4519
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4520
は、@ 文字で始まる引数を見つけると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4521
そのファイルの内容を展開して引数リストに挿入します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4522
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4523
引数ファイルを 1 つ指定する例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4524
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4525
argfile という名前の引数ファイルにすべての 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4526
Javadoc 引数を格納し、次のように使用することができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4527
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4528
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4529
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4530
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4531
% javadoc @argfile
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4532
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4533
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4534
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4535
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4536
この引数ファイルには、次の例で示されている 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4537
2 つのファイルの内容を両方とも入れることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4538
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4539
引数ファイルを 2 つ指定する例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4540
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4541
Javadoc オプション用に 1 つ、パッケージ名またはソースファイル名用に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4542
1 つというように、2 つの引数ファイルを作成し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4543
次のようにして使用することができます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4544
なお、このあとのリストでは、行の継続文字を使用していません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4545
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4546
以下の内容を含む options という名前のファイルを作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4547
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4548
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4549
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4550
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4551
\-d docs-filelist
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4552
\-use
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4553
\-splitindex
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4554
\-windowtitle 'Java 2 Platform v1.3 API Specification'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4555
\-doctitle 'Java<sup><font size="-2">TM</font></sup> 2\\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4556
		Platform 5.0 API Specification'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4557
\-header '<b>Java 2 Platform </b><br><font size="-1">5.0</font>'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4558
\-bottom 'Copyright 1993-2000 Sun Microsystems, Inc. All Rights Reserved.'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4559
\-group "Core Packages" "java.*"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4560
\-overview /java/pubs/ws/1.5/src/share/classes/overview-core.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4561
\-sourcepath /java/pubs/ws/1.5/src/share/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4562
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4563
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4564
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4565
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4566
以下の内容を含む packages という名前のファイルを作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4567
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4568
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4569
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4570
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4571
com.mypackage1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4572
com.mypackage2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4573
com.mypackage3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4574
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4575
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4576
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4577
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4578
そのあと、次のコマンドを使用して javadoc を実行します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4579
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4580
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4581
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4582
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4583
% javadoc @options @packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4584
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4585
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4586
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4587
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4588
パス付きの引数ファイルの例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4589
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4590
引数ファイルには、パスを指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4591
ただし、そのファイル内に指定されたファイル名は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4592
現在の作業ディレクトリから見た相対パスになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4593
つまり、下の例の場合は、path1 や 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4594
path2 から見た相対パスではありません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4595
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4596
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4597
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4598
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4599
% javadoc @path1/options @path2/packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4600
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4601
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4602
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4603
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4604
オプションの引数の例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4605
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4606
次に、javadoc オプションに対する引数だけを引数ファイルに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4607
格納する例を示します。 ここでは、\-bottom オプションを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4608
例に取り上げます。そのオプションには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4609
かなり長い引数を指定することがあるからです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4610
まず、このオプションのテキスト引数になる
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4611
次のような内容を含む、bottom という名前の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4612
ファイルを作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4613
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4614
'<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4615
Submit a bug or feature</a><br><br>Java is a 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4616
trademark or registered trademark of 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4617
Sun Microsystems, Inc. in the US and other 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4618
countries.<br>Copyright 1993-2000 Sun 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4619
Microsystems, Inc. 901 San Antonio Road,<br>Palo 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4620
Alto, California, 94303, U.S.A. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4621
All Rights Reserved.</font>'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4622
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4623
そのあと、次のようにして 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4624
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4625
ツールを実行します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4626
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4627
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4628
% javadoc \-bottom @bottom @packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4629
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4630
また、引数ファイルの先頭に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4631
\-bottom オプションを組み込んでおけば、次のようにして実行できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4632
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4633
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4634
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4635
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4636
% javadoc @bottom @packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4637
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4638
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4639
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4640
.TP  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4641
.SH 実行
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4642
.SS Javadoc の実行
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4643
バージョン番号 -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4644
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4645
javadoc のバージョン番号は 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4646
.BR javadoc \-J\-version
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4647
を使用することで確認できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4648
標準ドックレットのバージョン番号は出力ストリームに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4649
表示されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4650
これは \-quiet オプションでオフにできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4651
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4652
プログラムから利用できる public インタフェース -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4653
Java 言語で書かれたプログラム内から 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4654
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4655
ツールを呼び出します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4656
このインタフェースは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4657
.BR com.sun.tools.javadoc.Main 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4658
(javadoc は再入) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4659
にあります。 詳細は、「標準ドックレット」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4660
を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4661
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4662
\f3ドックレットの実行\fP \- 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4663
下記の説明は、標準 HTML ドックレットを呼び出すためのものです。カスタムドックレットを呼び出すには、\-doclet および \-docletpath オプションを使用します。特定のドックレットを実行した完全な例については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4664
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4665
「\f2Running the MIF Doclet\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4666
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4667
(http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet) を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4668
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4669
.SH "使用例"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4670
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4671
は、パッケージ全体に対して実行することも、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4672
個々のソースファイルに対して実行することも
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4673
できます。各パッケージ名は、それぞれの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4674
パッケージ名に対応するディレクトリ名を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4675
持ちます。次の例では、ソースファイルは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4676
.BR /home/src/java/awt/*java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4677
にあります。生成先ディレクトリは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4678
.BR /home/html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4679
です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4680
.SS "1 つ以上のパッケージのドキュメント化"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4681
パッケージをドキュメント化するには、その
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4682
パッケージのソースファイル (*\f3.java\f1) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4683
が、パッケージと同じ名前を持つディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4684
内に存在していなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4685
パッケージ名が複数の識別子で構成されている 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4686
(java.awt.color のように、各識別子はドットで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4687
区切られている) 場合は、後続の各識別子が下位の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4688
サブディレクトリに対応して
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4689
いなければなりません (java/awt/color など)。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4690
1 つのパッケージのための複数のソースファイルを、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4691
異なる場所にある 2 つのディレクトリツリーに分けて
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4692
格納することも可能です
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4693
 (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4694
.BR src1/java/awt/color 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4695
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4696
.BR src2/java/awt/color 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4697
など)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4698
ただし、その場合は、\-sourcepath によって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4699
その両方の場所を指定しなければなりません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4700
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4701
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4702
を実行するには、cd コマンドを使って
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4703
ディレクトリを変更するか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4704
または 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4705
.B \-sourcepath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4706
オプションを使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4707
それぞれの例を次に示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4708
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4709
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4710
.B ケース 1 - 1 つ以上のパッケージからの起動を再帰的に実行 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4711
この例では javadoc が任意のディレクトリから実行できるように、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4712
.BR \-sourcepath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4713
を使用し、再帰的処理のために -subpackages (1.4 の新オプション) を使用します。 これは、java のサブパッケージ (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4714
.BR java.net 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4715
および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4716
.BR java.lang 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4717
をルートとするパッケージを除く) を処理します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4718
これによって 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4719
.BR java.lang.ref (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4720
.BR java.lang  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4721
のサブパッケージ) が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4722
除外されることに注意してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4723
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4724
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4725
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4726
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4727
% javadoc \-d /home/html \-sourcepath /home/src \-subpackages java \-exclude java.net:java.lang
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4728
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4729
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4730
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4731
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4732
他のパッケージツリーを処理するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4733
.BR java:javax:org.xml.sax 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4734
のように、その名前を 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4735
.BR \-subpackages 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4736
引数に追加します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4737
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4738
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4739
.B ケース 2 - ルートソースディレクトリに移ってから明示的なパッケージを実行 - 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4740
完全修飾パッケージの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4741
親ディレクトリに移動します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4742
次に、ドキュメント化する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4743
1 つ以上のパッケージ名を指定して 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4744
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4745
を実行します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4746
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4747
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4748
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4749
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4750
% cd /home/src/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4751
% javadoc \-d /home/html java.awt java.awt.event
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4752
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4753
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4754
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4755
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4756
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4757
.B ケース 3 - 任意のディレクトリから実行。ソースファイルは 1 つのディレクトリツリー内にある - このケースでは、現在のディレクトリがどこであってもかまいません。 トップレベルのパッケージの親ディレクトリを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4758
.B \-sourcepath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4759
に指定し、ドキュメント化する 1 つ以上のパッケージ名を指定して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4760
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4761
を実行します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4762
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4763
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4764
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4765
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4766
  % javadoc -d /home/html -sourcepath /home/src java.awt java.awt.event
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4767
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4768
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4769
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4770
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4771
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4772
.B ケース 4 - 任意のディレクトリから実行。ソースファイルは複数のディレクトリツリー内にある - これはケース 3 と似ていますが、パッケージが複数のディレクトリツリーに存在します。 各ツリーのルートへのパスを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4773
.B \-sourcepath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4774
に指定し (コロンで区切る)、ドキュメント化する 1 つ以上のパッケージ名を指定して、javadoc を実行します。 1 つのパッケージのすべてのソースファイルが、1 つのルートディレクトリの下に存在しなければならない、ということはありません。ソースパスとして指定された場所のどこかで見付かれば十分です。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4775
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4776
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4777
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4778
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4779
% javadoc \-d /home/html \-sourcepath /home/src1:/home/src2 java.awt java.awt.event
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4780
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4781
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4782
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4783
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4784
結果: どちらのケースでも、パッケージ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4785
.B java.awt 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4786
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4787
.B java.awt.event 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4788
の public および protected 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4789
なクラスとインタフェースを対象に、HTML 形式の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4790
ドキュメントが生成され、指定
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4791
された生成先ディレクトリ (\f3/home/html\f1) に HTML ファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4792
保存されます。2 つ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4793
以上のパッケージが生成されるので、ドキュメントは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4794
パッケージのリスト、クラスのリスト、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4795
およびメインページの 3 つのフレームを持つことになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4796
.SS "1 つ以上のクラスのドキュメント化"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4797
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4798
ツールを実行する 2 番目の方法は、1 つ以上のソースファイル (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4799
.B .java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4800
) を渡すことです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4801
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4802
は、次の 2 つのどちらかの方法で実行できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4803
1 つは、(cd によって) ディレクトリを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4804
変更する方法、もう 1 つは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4805
.B .java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4806
ファイルへのパスを完全指定する方法です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4807
相対パスは、現在のディレクトリからの相対パスです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4808
ソースファイルを渡した場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4809
.B \-sourcepath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4810
オプションは無視されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4811
アスタリスク (*) の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4812
ようなコマンド行ワイルドカードを使用すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4813
クラスのグループを指定できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4814
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4815
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4816
.B ケース 1 ソースディレクトリへの移動: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4817
.B .java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4818
ファイルのあるディレクトリに移動します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4819
次に、ドキュメント化する 1 つ以上の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4820
ソースファイルの名前を指定して 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4821
.BR javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4822
を実行します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4823
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4824
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4825
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4826
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4827
% cd /home/src/java/awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4828
% javadoc \-d /home/html Button.java Canvas.java Graphics*.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4829
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4830
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4831
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4832
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4833
.RS 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4834
この例では、クラス Button と Canvas、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4835
および先頭が Graphics で始まるクラスの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4836
HTML 形式のドキュメントが生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4837
.BR javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4838
の引数として渡されているのは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4839
パッケージ名ではなくソースファイルなので、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4840
ドキュメントは、クラスのリストと
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4841
メインページの 2 つのフレームを持つことになります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4842
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4843
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4844
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4845
.B ケース 2 パッケージのルートディレクトリへの移動: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4846
これは、同じルート内にある複数のサブパッケージのソースファイルを個々に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4847
ドキュメント化する場合に便利です。パッケージの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4848
ルートディレクトリに移動し、各ソースファイルを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4849
ルートからのパスで指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4850
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4851
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4852
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4853
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4854
% cd /home/src/
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4855
% javadoc \-d /home/html java/awt/Button.java java/applet/Applet.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4856
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4857
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4858
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4859
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4860
.RS 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4861
この例では、Button クラスおよび Applet クラス
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4862
用の HTML 形式のドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4863
が生成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4864
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4865
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4866
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4867
.B ケース 3 すべてのディレクトリから: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4868
このケースでは、現在のディレクトリがどの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4869
ディレクトリでも問題はありません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4870
ドキュメント化する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4871
.B .java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4872
ファイルへの絶対パスまたは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4873
相対パスを指定して 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4874
.BR javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4875
を実行します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4876
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4877
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4878
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4879
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4880
% javadoc \-d /home/html /home/src/java/awt/Button.java /home/src/java/awt/Graphics*.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4881
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4882
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4883
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4884
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4885
.RS 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4886
この例では、クラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4887
.B Button 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4888
および先頭が 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4889
.BR Graphics 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4890
で始まるクラスの HTML 形式
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4891
のドキュメントが生成されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4892
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4893
.SS "パッケージとクラスのドキュメント化"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4894
パッケージ全体と個々のクラスを同時にドキュメント
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4895
化できます。次に示すのは、上に示
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4896
した 2 つの例を組み合わせた例です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4897
.B \-sourcepath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4898
は、パッケージへのパスに対しては使用できますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4899
個々のクラスのパスに対しては使用
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4900
できません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4901
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4902
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4903
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4904
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4905
% javadoc \-d /home/html \-sourcepath /home/src java.awt /home/src/java/applet/Applet.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4906
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4907
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4908
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4909
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4910
この例では、パッケージ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4911
.B java.awt 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4912
とクラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4913
.B Applet 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4914
の HTML 形式のドキュメントが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4915
生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4916
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4917
は、Applet のパッケージ名を、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4918
.B Applet.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4919
ソースファイル内のパッケージの宣言 (宣言がある場合) から決定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4920
.SS  "使用例"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4921
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4922
ツールには、多くの便利なオプションがあり、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4923
その中のいくつかは、ほかのオプションよりもよく
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4924
使われます。以下は、makefile 変数を使って Java プラット
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4925
フォーム API 上で
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4926
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4927
ツールを実行するために使う効果的なコマンドです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4928
ここでは 180M バイトのメモリを使用して、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4929
Java 2 Platform, Standard Edition, v1.2 に
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4930
存在する、約 1500 個の public および protected 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4931
クラスについてドキュメントを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4932
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4933
同じ例を 2 回掲載します。最初の例はコマンド行から実行するもので、2 番目の例は Makefile から実行するものです。 オプションの引数に絶対パスを使用しているため、任意のディレクトリからこの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4934
.B javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4935
コマンドを実行できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4936
.SS コマンド行の例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4937
次のコマンド行の例は 900 文字を超えているため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4938
DOS などのシェルには大きすぎます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4939
この制限を回避するには、コマンド行
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4940
引数ファイルを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4941
または、シェルスクリプトを記述します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4942
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4943
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4944
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4945
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4946
% javadoc \-sourcepath /java/jdk/src/share/classes            \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4947
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4948
    \-overview /java/jdk/src/share/classes/overview.html      \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4949
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4950
    \-d /java/jdk/build/api                                   \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4951
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4952
    \-use                                                     \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4953
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4954
    \-splitIndex                                              \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4955
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4956
    \-windowtitle 'Java 2 Platform 5.0 API Specification'    \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4957
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4958
    \-doctitle 'Java<sup><font size="\-2">TM</font></sup> 2 Platform 5.0 API Specification' \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4959
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4960
    \-header '<b>Java 2 Platform </b><br><font size="\-1">5.0</font>' \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4961
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4962
    \-bottom '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4963
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4964
a bug or feature</a><br><br>Java is a trademark or registered trademark of Sun Microsystems, 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4965
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4966
Inc. in the US and other countries.<br>Copyright 1993\-1999 Sun Microsystems, Inc. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4967
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4968
901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>' \\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4969
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4970
    \-group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4971
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4972
    \-group "Extension Packages" "javax.*"                    \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4973
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4974
    \-J\-Xmx180m                                               \\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4975
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4976
    @packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4977
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4978
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4979
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4980
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4981
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4982
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4983
上記のコマンドで、packages は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4984
処理対象のパッケージ名 (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4985
.BR java.applett 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4986
.BR java.lang など) が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4987
入っているファイルの名前です。 各オプションの、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4988
単一引用符で囲まれた引数の内側には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4989
改行文字を挿入できません。 たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4990
この例をコピー&ペーストする場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4991
.B \-bottom 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4992
オプションから改行文字を削除してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4993
さらに、このあとの「注」も参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4994
.SS Makefile の例
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4995
ここでは、GNU Makefile の例を示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4996
Windows の Makefile の例については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4997
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4998
「\f2creating a makefile for Windows\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4999
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5000
(http://java.sun.com/j2se/javadoc/faq/index.html#makefiles) を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5001
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5002
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5003
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5004
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5005
javadoc \-\fP\f3sourcepath\fP\f3 $(SRCDIR)              \\   /* Sets path for source files     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5006
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5007
        \-\fP\f3overview\fP\f3 $(SRCDIR)/overview.html  \\   /* Sets file for overview text    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5008
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5009
        \-\fP\f3d\fP\f3 /java/jdk/build/api             \\   /* Sets destination directory     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5010
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5011
        \-\fP\f3use\fP\f3                               \\   /* Adds "Use" files               */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5012
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5013
        \-\fP\f3splitIndex\fP\f3                        \\   /* Splits index A\-Z               */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5014
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5015
        \-\fP\f3windowtitle\fP\f3 $(WINDOWTITLE)        \\   /* Adds a window title            */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5016
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5017
        \-\fP\f3doctitle\fP\f3 $(DOCTITLE)              \\   /* Adds a doc title               */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5018
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5019
        \-\fP\f3header\fP\f3 $(HEADER)                  \\   /* Adds running header text       */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5020
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5021
        \-\fP\f3bottom\fP\f3 $(BOTTOM)                  \\   /* Adds text at bottom            */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5022
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5023
        \-\fP\f3group\fP\f3 $(GROUPCORE)                \\   /* 1st subhead on overview page   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5024
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5025
        \-\fP\f3group\fP\f3 $(GROUPEXT)                 \\   /* 2nd subhead on overview page   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5026
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5027
        \-\fP\f3J\fP\f3\-Xmx180m                         \\   /* Sets memory to 180MB           */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5028
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5029
        java.lang java.lang.reflect        \\   /* Sets packages to document      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5030
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5031
        java.util java.io java.net         \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5032
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5033
        java.applet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5034
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5035
        
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5036
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5037
WINDOWTITLE = 'Java 2 Platform v1.2 API Specification'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5038
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5039
DOCTITLE = 'Java<sup><font size="\-2">TM</font></sup> 2 Platform v1.2 API Specification'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5040
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5041
HEADER = '<b>Java 2 Platform </b><br><font size="\-1">v1.2</font>'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5042
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5043
BOTTOM = '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5044
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5045
    a bug or feature</a><br><br>Java is a trademark or registered trademark 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5046
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5047
    of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-1999    
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5048
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5049
    Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5050
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5051
    All Rights Reserved.</font>'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5052
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5053
GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5054
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5055
GROUPEXT  = '"Extension Packages" "javax.*"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5056
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5057
SRCDIR = '/java/jdk/1.2/src/share/classes'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5058
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5059
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5060
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5061
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5062
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5063
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5064
Makefile の引数は、単一引用符で囲みます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5065
.SS 注
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5066
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5067
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5068
.B \-windowtitle 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5069
オプションを省略すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5070
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5071
ツールによってドキュメントタイトルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5072
ウィンドウタイトルにコピーされます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5073
.B \-windowtitle 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5074
のテキストは、基本的に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5075
.B \-doctitle 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5076
と同じです。ただし、HTML タグは使用しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5077
HTML タグは、ウィンドウタイトルにそのままの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5078
テキストとして表示されてしまいます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5079
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5080
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5081
この例のように 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5082
.B \-footer 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5083
オプションを省略すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5084
.B Javadoc 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5085
ツールによってヘッダテキストが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5086
フッタにコピーされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5087
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5088
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5089
この例では必要ありませんが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5090
.B \-classpath 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5091
および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5092
.BR \-link 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5093
も重要なオプションです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5094
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5095
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5096
.SH トラブルシューティング
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5097
.SS 一般的なトラブルシューティング
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5098
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5099
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5100
Javadoc FAQ - よく問題となるバグや
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5101
トラブルシューティングの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5102
ヒントは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5103
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5104
「\f2Javadoc FAQ\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5105
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5106
(http://java.sun.com/j2se/javadoc/faq/index.html#B) にあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5107
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5108
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5109
バグおよび制限事項 - また、バグの一部は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5110
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5111
「\f2Important Bug Fixes and Changes\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5112
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5113
(http://java.sun.com/j2se/1.5.0/fixedbugs/index.html) でも参照できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5114
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5115
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5116
バージョン番号 - バージョン番号を参照してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5117
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5118
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5119
有効なクラスだけをドキュメント化 -  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5120
javadoc がパッケージをドキュメント化するとき、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5121
有効なクラス名で構成されているファイルだけを
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5122
読み込むようになりました。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5123
ファイル名にハイフン (-) などを含めることで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5124
javadoc がファイルを解析しないようにできます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5125
.SS エラーと警告
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5126
エラーメッセージおよび警告メッセージには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5127
ファイル名と宣言行に対する行番号が
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5128
含まれますが、doc コメントの特定の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5129
行に対する行番号は含まれません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5130
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5131
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5132
"error: cannot read: Class1.java" -
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5133
.B Javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5134
ツールは現在のディレクトリの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5135
.BR Class1.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5136
クラスを読み込もうとしています。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5137
クラス名は、絶対パスまたは相対パスで表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5138
この場合、./Class1.java と同じです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5139
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5140
.SH "環境"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5141
.TP 20
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5142
.SB CLASSPATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5143
環境変数は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5144
.B javadoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5145
がユーザクラスファイルを探すときに使う、パスを指定します。環境変数は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5146
.B \-classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5147
オプションによってオーバーライドされます。ディレクトリは
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5148
コロンで分割します。たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5149
次のとおりです。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5150
.RS 15
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5151
.sp 1n
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5152
.B .:/home/classes:/usr/local/java/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5153
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5154
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5155
.ne 11
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5156
.SH "関連項目"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5157
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5158
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5159
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5160
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5161
javac 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5162
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5163
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5164
java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5165
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5166
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5167
jdb 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5168
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5169
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5170
javah 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5171
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5172
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5173
javap 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5174
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5175
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5176
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5177
http://java.sun.com/j2se/javadoc/index.jsp 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5178
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5179
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5180
「\f2Javadoc Home Page\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5181
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5182
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5183
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5184
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5185
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5186
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5187
「\f2How to Write Doc Comments for Javadoc\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5188
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5189
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5190
クラスパスの設定
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5191
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5192
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5193
javac と javadoc がクラスを検索する方法 (tools.jar)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5194
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5195
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5196
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5197
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5198
Javadoc は、Sun Microsystems, Inc の商標です (\f2javadoc\fP コマンド自体には商標シンボルは不要)。