jdk/src/linux/doc/man/ja/idlj.1
author jjg
Tue, 11 Mar 2008 13:14:55 -0700
changeset 168 25697c18650b
parent 2 90ce3da70b43
child 2692 345bc8d65b19
permissions -rw-r--r--
6307187: clean up code for -Xlint:options Summary: introduce common code for handling one-of and any-of options Reviewed-by: mcimadamore
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 2001-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
.\" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
.TH idlj 1 "2006 年 9 月 4 日" "Java SE 6" "ユーザーコマンド"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
.SH "名前"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
idlj - IDL-to-Java コンパイラ
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
.B idlj
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
は、指定された IDL ファイルから Java バインディングを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
.SH "形式"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
.B idlj
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
[
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
.IB options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
.B idl-file
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
.BR idl-file
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
には、Interface Definition Language (IDL) 定義が格納されている
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
ファイルの名前を指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
.BR Options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
は任意の順序で指定できますが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
.BR idl-file
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
よりも前に指定する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
.SH "機能説明"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
IDL-to-Java コンパイラは、指定された IDL ファイルに対して Java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
バインディングを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
バインディングの詳細は、「\f2OMG IDL to Java Language Language Mapping Specification\fP」
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
(http://java.sun.com/javase/6/docs/technotes/guides/idl/mapping/jidlMapping.html) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
IDL-to-Java コンパイラの旧リリースのなかには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
.BR idltojava という名前が付けられていたものがあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
.SH "クライアントバインディングとサーババインディングの発行"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
.BR My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
という名前の IDL ファイルに対して Java バインディングを生成
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
するには、次のように指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
idlj My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
クライアント側のバインディングを生成する上記のコマンドは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
次のようにも指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
idlj -fclient My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
クライアント側のバインディングには、サーバ側のスケルトンは
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
取り込まれていません。インタフェースに対してサーバ側のバインディング
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
を生成するには、次のように指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
idlj -fserver My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
サーバ側のバインディングには、クライアント側のバインディングのほか
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
にスケルトンが取り込まれています。これらはすべて、POA (継承モデル) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
クラスです。クライアント側とサーバ側の両方のバインディングを生成する
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
には、以下の等価コマンドのどちらか一方を使用してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
idlj -fclient -fserver My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
idlj -fall My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
サーバ側モデルとしては、継承モデルと Tie 委譲モデルの 2 種類を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
利用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
デフォルトのサーバ側モデルは、ポータブルサーバント継承モデルです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
.BR My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
でインタフェース My が定義されていると、ファイル 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
.BR MyPOA.java が生成されます。ユーザは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
.BR My に対してその実装を提供する必要があります。この実装は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
.BR MyPOA から継承しなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
.BR MyPOA.java は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
\f2org.omg.PortableServer.Servant\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
(http://java.sun.com/javase/6/docs/api/org/omg/PortableServer/Servant.html) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
を拡張するストリームベースのスケルトンであり、このスケルトンが実装する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
IDL インタフェースに関連した
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
.BR InvokeHandler
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
インタフェースとオペレーションインタフェースを実装します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
\f2Portable Object Adapter (POA)\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
(http://java.sun.com/javase/6/docs/technotes/guides/idl/POA.html) の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
.BR PortableServer 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
モジュールは、ネイティブ Servant 型を定義します。Java プログラミング言語では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
.BR Servant
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
型は、Java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
.BR org.omg.PortableServer.Servant
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
クラスにマップされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
これはすべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
.BR POA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
サーバント実装の基底クラスとして機能し、アプリケーション開発者が呼び出せる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
多数のメソッドを提供します。また、POA 自体が呼び出したり、サーバント動作を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
制御するためにユーザが上書きしたりできるメソッドも提供します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
継承モデルには、J2SE 1.4 より前のバージョンの Java プログラミング言語
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
と互換性のあるサーバ側バインディングを生成するために
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
.BR -oldImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
フラグを使用するというオプションもあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
\f2\-oldImplBase\fP フラグの使用は非標準であることに注意してください。これらの API はまもなく非推奨となります。このフラグを使用するのは、J2SE 1.3 で記述された既存のサーバとの互換性を確保する必要がある場合だけにしてください。その場合、既存の MAKEFILE を変更し、\f2\-oldImplBase\fP フラグを \f2idlj\fP コンパイラに追加する必要があります。そうしないと、POA ベースのサーバ側マッピングが生成されてしまいます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
下位互換を維持したサーバ側
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
バインディングを生成するには、次のように指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
idlj -fclient -fserver -oldImplBase My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
idlj -fall -oldImplBase My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
.BR My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
内でインタフェース My が定義されていると、ファイル 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
.I _MyImpleBase.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
が生成されます。ユーザは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
.BR My
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
に対してその実装を提供する必要があります。この実証は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
.I _MyImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
 から継承しなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
もう一方のサーバ側モデルは、Tie モデルと呼ばれます。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
委譲モデルです。Tie モデルは Tie とスケルトンを同時には生成
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
できないため、これらは別々に生成する必要があります。次のコ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
マンドは、Tie モデルに対してバインディングを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
idlj -fall My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
idlj -fallTIE My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
インタフェース 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
.BR My
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
の場合、2 つめのコマンドは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
.BR MyPOATie.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 を生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
.BR MyPOATie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
のコンストラクタは、delegate を受け取ります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
この例ではデフォルトの POA モデルを使用しているので、コンストラクタは \f2poa\fP も必要とします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
ユーザは、delegate 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
に対して実装を提供する必要があります。ただし、インタフェース 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
.BR MyOperations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
を継承すればよく、ほかのクラスから継承する必要はありません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
しかし、この実装を ORB と共に使用するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
.BR MyPOATie 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
内に実装をラップする必要があります。例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    ORB orb = ORB.init(args, System.getProperties());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    // rootpoa への参照を取得し、POAManager を有効にします
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    POA rootpoa = (POA)orb.resolve_initial_references("RootPOA");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    rootpoa.the_POAManager().activate();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    // サーバントを作成し、それを ORB に登録します
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    MyServant myDelegate = new MyServant();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    myDelegate.setORB(orb); 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    // Tie を作成します。サーバントが delegate になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
    MyPOATie tie = new MyPOATie(myDelegate, rootpoa);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    // Tie の objectRef を取得します
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    My ref = tie._this(orb);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
実装をほかの実装から継承しなければならない場合は、標準の継承モデル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
の代わりに Tie モデルを使用することもできます。Java は任意の数の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
インタフェース継承を認めていますが、クラスの継承に使用できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
スロットは 1 つだけです。継承モデルを使用すると、このスロットが占
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
有されます。Tie モデルを使用すると、スロットをユーザ自身の使用の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
ために解放できます。ただし、一定レベルの間接参照を引き起こすと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
いう欠点があります。つまり、メソッドを呼び出すと、余分なメソッド呼
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
び出しが 1 つ発生します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
1.4 よりも前の J2SE バージョンで IDL-to-Java 言語
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
マッピングのバージョンと互換性があるサーバ側の Tie モデルバインディングを生成
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
するには、次のように指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
idlj -oldImplBase -fall My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
idlj -oldImplBase -fallTIE My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
インタフェース
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
.BR My
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
の場合、このコマンドは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
.I My_Tie.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
を生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
.I My_Tie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
のコンストラクタは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
.BR impl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
を受け取ります。ユーザは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
.BR impl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
に対して実装を提供する必要があります。ただし、インタフェース 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
.BR HelloOperations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
を継承すればよく、ほかのクラスから継承する必要はありません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
しかし、この実装を ORB と共に使用するには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
.BR My_Tie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
 内に実装をラップする必要があります。例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    ORB orb = ORB.init(args, System.getProperties());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    // サーバントを作成し、それを ORB に登録します
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    MyServant myDelegate = new MyServant();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
    myDelegate.setORB(orb); 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
    // Tie を作成します。サーバントが delegate になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
    MyPOATie tie = new MyPOATie(myDelegate);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
    // Tie の objectRef を取得します
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
    My ref = tie._this(orb);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
.SH "発行されたファイルの代替場所の指定"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
発行されたファイルを現在のディレクトリ以外のディレクトリに保存したい場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
次のようにコンパイラを呼び出してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
idlj -td /altdir My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
インタフェース 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
.BR My
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
の場合、バインディングは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
.BR ./My.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
 ではなく 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
.BR /altdir/My.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
などに対して発行されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
.SH "インクルードファイルの代替場所の指定"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
.BR My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
にほかの idl ファイル、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
.BR MyOther.idl 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
が取り込まれている場合、コンパイラは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
.BR MyOther.idl 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
がローカルディレクトリに存在すると見なします。たとえば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
.BR MyOther.idl 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
.BR /includes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
に存在する場合は、次のコマンドでコンパイラを呼び出します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
idlj -i /includes My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
.ft 1 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
.BR たとえば、My.idl が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
.BR /moreIncludes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
に存在する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
.BR Another.idl 
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
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
idlj -i /includes -i /moreIncludes My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
.ft 1 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
.LP
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
CLASSPATH にリストされているディレクトリ内に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
.BR idl.config
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
という名前のファイルを作成します。そして、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
.BR idl.config
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
内に次の形式の行を 1 つ作成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
includes=/includes;/moreIncludes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
.ft 1 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
コンパイラはこのファイルを見つけ、インクルードリストに読み込みます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
この例では 2 つのディレクトリ間の区切り文字はセミコロン (;) であること
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
に注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
この区切り文字はプラットフォームによって異なります。Windows プラットフォームではセミコロンを使用し、UNIX プラットフォームではコロンを使用する、などのようになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
インクルードの詳
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
細は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
\f2CLASSPATH\ のドキュメント (Solaris: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
(Windows: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
.SH "インクルードファイルに対するバインディングの発行"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
デフォルトでは、コマンド行 idl ファイルに定義されているインタフェース、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
構造体などに対してのみ、Java バインディングが生成されます。インクルード
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
ファイルに定義されているタイプの Java バインディングは生成されません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
例として、次の 2 つの idl ファイルを考えてみましょう。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
.B My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
#include <MyOther.idl> 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
interface My 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
{ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
}; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
.B MyOther.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
interface MyOther 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
{ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
次のコマンドは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
.BR My
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
に対する Java バインディングしか生成しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
idlj My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
.BR My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
内に定義されているすべてのタイプ、および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
.BR My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
に取り込まれているファイル (この例では 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
.BR MyOther.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
) 内に定義されているすべてのタイプを生成するには、
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
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
idlj -emitAll My.idl 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
このデフォルトの規則については、次の点に注意する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
グローバルスコープに出現する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
.BR #include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
文は、記述どおりに処理されます。これらの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
.BR #include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
文は、インポート文と見なすことができます。一部の囲みスコープ内に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
出現する #include 文は、通常の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
.BR #include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
文として扱われます。つまり、インクルードファイル内のコードは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
オリジナルファイル内に出現しているかのように扱われ、これに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
対して Java バインディングが発行されます。例を示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
.B My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
#include <MyOther.idl> 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
interface My 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
{ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
  #include <Embedded.idl> 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
}; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
.B MyOther.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
interface MyOther 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
{ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
}; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
.B Embedded.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
enum E {one, two, three};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
次のコマンドを実行すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
idlj My.idl
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
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
以下の Java ファイルのリストが生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
.B ./MyHolder.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
.B ./MyHelper.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
.B ./_MyStub.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
.B ./MyPackage\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
.B ./MyPackage/EHolder.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
.B ./MyPackage/EHelper.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
.B ./MyPackage/E.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
.B ./My.java\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
.BR MyOther.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
は生成されないことに注意してください。これは、インポートに類似した
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
.BR #include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
で定義されているためです。しかし、通常の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
.BR #include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
に定義された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
.BR E.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
は生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
.BR Embedded.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
はインタフェース My のスコープ内に取り込まれているため、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
.BR My
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
のスコープ内 (つまり 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
.BR MyPackage
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
) に生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
上記の例で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
.BI -emitAll
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
フラグが使用されていた場合は、すべてのインクルードファイル内に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
定義されているすべてのタイプが発行されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
.SH "パッケージ接頭辞の挿入"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
あなたが次の IDL ファイルを作成した ABC という名の企業に勤務していると
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
仮定してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
.B Widgets. idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
module Widgets 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
{ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
  interface W1 {...}; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
  interface W2 {...}; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
}; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
このファイルに対して IDL-to-Java コンパイラを実行すると、パッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
Widgets 内の W1 と W2 に対して Java バインディングが生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
しかし、業界規約では、企業のパッケージは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
.BR com.<company name>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
という名前のパッケージ内に配置しなければならないと規定されています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
そのため、この 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
.BR Widgets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
パッケージのままでは不十分です。規定に従うには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
.BR com.abc.Widgets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
でなければなりません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
.BR Widgets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
モジュールにこのパッケージ接頭辞を配置するには、次のコマンドを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
実行してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
idlj -pkgPrefix Widgets com.abc Widgets.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
.BR Widgets.idl 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
を取り込んでいる IDL ファイルが存在する場合は、そのコマンド内にも 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
.BI \-pkgPrefix 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
フラグを指定する必要があります。このフラグを指定しないと、IDL ファイルは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
.BR com.abc.Widgets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
パッケージではなく 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
.BR Widgets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
パッケージを検索します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
接頭辞を必要とするこれらのパッケージが多数存在する場合は、前述した 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
.BR idl.config
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
ファイルに配置する方が簡単でしょう。各パッケージ接頭辞行は、次の書式で記述します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
PkgPrefix.<type>=<prefix>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
.RE
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
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
PkgPrefix.Widgets=com.abc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
このオプションを使用しても、リポジトリ ID には影響を与えません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
.SH "コンパイル前のシンボルの定義"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
バインディング内にデバッグコードを取り込む場合などに IDL ファイル内
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
にコンパイル用のシンボルが定義されていないときは、それらのシンボル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
を定義する必要があることがあります。次のコマンド
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
idlj -d MYDEF My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
は、My.idl 内に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
.BR #define
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
.BR MYDEF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
という行を含めるのと同じです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
.SH "既存のバインディングの保持"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
Java バインディングファイルが既に存在する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
.BI \-keep 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
フラグを使用してコンパイラによる上書きを防止できます。デフォルトでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
既に存在するかどうかにかかわらずすべてのファイルが生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
ファイルをカスタマイズ (カスタマイズはその内容がよほど適切でない限り推奨
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
されません) してある場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
.BI \-keep 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
オプションが非常に役立ちます。次のコマンド
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
idlj -keep My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
は、まだ存在していないすべてのクライアント側バインディングを発行します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
.SH "コンパイルの進捗の表示"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
IDL-to-Java コンパイラは、その実行段階でステータスメッセージを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
生成します。この生成を詳細 (verbose) モードにするには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
.BR -v
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
オプションを使用してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
idlj -v My.idl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
デフォルトでは、コンパイラは詳細モードで動作しません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
.SH "バージョン情報の表示"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
IDL-to-Java コンパイラのビルドバージョンを表示するには、コマンド行で
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
.BI \-version
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
オプションを指定してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
idlj -version 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
コンパイラが生成したバインディング内に、バージョン情報も表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
コマンド行に指定されるその他のオプションは無視されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
.SH "オプション"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
.BI \-d " symbol"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
これは、IDL ファイルに次の行を指定するのと同じです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
#define symbol
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
.BI \-emitAll
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
.BR #include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
ファイル内に指定されているものも含め、すべてのタイプを発行します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
.BI \-fside
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
発行するバインディングを定義します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
.BI side
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
.BR client
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
.BR server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
.BR serverTIE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
.BR all
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
.BR allTIE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
のうちいずれか 1 つを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
.BR -fserverTIE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
.BR -fallTIE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
オプションを指定すると、委譲モデルスケルトンが発行されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
フラグを指定しない場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
.BR -fclient
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
と見なされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
.BI \-i " include-path"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
デフォルトでは、現在のディレクトリでインクルードファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
検索されます。このオプションを使用すると、ほかのディレクトリを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
追加できます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
.BI \-keep
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
生成されるファイルが既に存在する場合、既存ファイルを上書きしません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
デフォルトでは、既存ファイルが上書きされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
.BI \-noWarn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
警告メッセージを表示しないようにします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
.BI \-oldImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
1.4 より前の JDK ORB と互換性のあるスケルトンを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
デフォルトでは、POA 継承モデルのサーバ側バインディングが生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
このオプションは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
.BR ImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
継承モデルクラスであるサーバ側バインディングを生成することによって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
旧バージョンの Java プログラミング言語との下位互換性を提供します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
.BI \-pkgPrefix " type prefix"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
ファイルスコープで 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
.BI type 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
が検出された場合、そのタイプに対して生成されるすべてのファイルについて、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
生成される Java パッケージ名に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
.BI prefix 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
という接頭辞を付けます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
.BI type 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
は、トップレベルモジュールの単純名か、モジュールの外部で定義された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
IDL タイプの単純名です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
.BI \-pkgTranslate " type package"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
特定の識別子内でモジュール名 \f2type\fP が見つかった場合、生成された Java パッケージ内のすべてのファイルに対して、その識別子内のモジュール名を \f2package\fP で置き換えます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
.BR pkgPrefix 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
変更が初めに行われることに注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
.BI type 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
はトップレベルモジュールの単純名か、モジュールの外部で定義された IDL タイプの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
単純名のいずれかであり、パッケージのフルネームと正確に一致する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
特定の識別子に一致する変換が 2 つ以上見つかった場合、もっとも長い一致が選択されます。たとえば、引数を次のように指定したとします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
  \-pkgTranslate foo bar \-pkgTranslate foo.baz buzz.fizz
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
このとき、次の変換が実行されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
foo          => bar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
foo.boo      => bar.boo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
foo.baz      => buzz.fizz
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
foo.baz.bar  => buzz.fizz.bar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
次のパッケージ名は変換できません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
\f2org\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
\f2org.omg\fP または \f2org.omg\fP のサブパッケージ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
これらのパッケージの変換を試みると、コンパイル不可能なコードが生成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
これらのパッケージを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
.BR \-pkgTranslate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
の後の最初の引数として使用すると、エラーとして扱われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
.BI \-skeletonName " xxx%yyy"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
.BI xxx%yyy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
をスケルトンの名前付けのパターンとして使用します。デフォルトは次のとおりです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
\(bu POA 基底クラス 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
.BR \-fserver
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
または
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
.BR \-fall
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
) の場合、%POA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
\(bu 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
.BR \-oldImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
クラス (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
.BR \-oldImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
および、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
.BR \-fserver
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
または
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
.BR \-fall
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
) の場合、_%ImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
.BI \-td " dir"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
出力ディレクトリとして、現在のディレクトリではなく
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
.BI dir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
を使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
.BI \-tieName " xxx%yyy"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
パターンに応じて Tie に名前を付けます。デフォルトは次のとおりです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
\(bu POA Tie 基底クラス (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
.BR \-fserverTie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
または 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
.BR \-fallTie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
) の場合、%POATie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
\(bu 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
.BR oldImplBase Tie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
クラス (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
.BR \-oldImplBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
および、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
.BR \-fserverTie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
または
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
.BR \-fallTie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
のいずれか) の場合、%_Tie
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
.BI \-nowarn, \-verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
詳細モードにします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
.BI \-version
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
バージョン情報を表示して終了します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
オプションの詳細は、「機能説明」の節を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
.SH "制限事項"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
\(bu グローバルスコープ内でエスケープされた識別子は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
IDL プリミティブ型 (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
.BR Object 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
または 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
.BR ValueBase
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
) と同じスペルであってはなりません。これは、シンボルテーブルがこれらの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
識別子を使用してすでにロードされているためです。これらを定義し直すと、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
それらの本来の定義を上書きすることになります (この制限は永続的に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
適用される見込み)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
\(bu IDL の fixed 型はサポートされていません。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
.SH "既知の問題"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
グローバル識別子のインポートは生成されません。エクスポートされていないローカル実装を呼び出すと例外が発生しますが、その原因はおそらく \f2ServerDelegate\fP DSI コード内の \f2NullPointerException\fP です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876