Spec-Zone .ru
спецификации, руководства, описания, API
|
This release of the JavaTM 2 Platform, Standard Edition, v.1.3, includes idlj, a compiler that reads an Object Management Group (OMG) Interface Definition Language (IDL) file and translates it,
or maps it, to a Java interface. The idlj compiler
also creates stub, skeleton, helper, holder, and other files as necessary.
These .java files are generated from the IDL file
according to the mapping specified in the OMG document (pdf format)
OMG IDL to Java Language Mapping Specification, formal, 99-07-53. The postscript version of this specification can be found at
Some topics from the OMG IDL to Java Language Mapping specification that are not easily summarized are:
CORBA objects are defined in OMG IDL (Object Management Group Interface Definition Language). J2SE v1.3 includes idlj, the IDL-to-Java compiler that maps the IDL-defined interfaces to Java classes and interfaces.
This overview shows the correspondence between OMG IDL constructs and Java constructs. Note that OMG IDL, as its name implies, defines interfaces. Like Java interfaces, IDL interfaces contain no implementations for their operations (methods in Java). In other words, IDL interfaces define only the signature for an operation (the name of the operation, the data type of its return value, the data types of the parameters that it takes, and any exceptions that it raises). The implementations for these operations need to be supplied in Java classes written by a Java programmer.
The following table lists the main constructs of IDL and the corresponding constructs in Java.
IDL Construct |
Java Construct |
---|---|
module |
package |
interface (non-abstract) |
signature interface and an operations interface, helper class, holder class |
interface (abstract) |
signature interface, helper class, holder class |
constant (not within an interface) |
public interface |
boolean |
boolean |
char, wchar |
char |
octet |
byte |
string, wstring |
java.lang.String |
short, unsigned short |
short |
long, unsigned long |
int |
long long, unsigned long long |
long |
float |
float |
double |
double |
fixed |
java.math.BigDecimal |
enum, struct, union |
class |
sequence, array |
array |
exception |
class |
readonly attribute |
accessor method |
readwrite attribute |
accessor and modifer methods |
operation |
method |
Home |
Copyright © 1995-98