Spec-Zone .ru
спецификации, руководства, описания, API
|
The tool idltojava,
Chapters from the OMG specification IDL/Java Language Mapping:
CORBA objects are defined in OMG IDL (Object Management Group Interface Definition Language). Before they can be used by a Java developer, their interfaces must be mapped to Java classes and interfaces. Java IDL includes a tool, idltojava, that performs this mapping automatically.
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 datatype of its return value, the datatypes 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 |
interface, helper class, holder class |
constant |
public static final |
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 |
enum, struct, union |
class |
sequence, array |
array |
exception |
class |
readonly attribute |
method for accessing value of attrubite |
readwrite attribute |
methods for accessing and setting value of attribute |
operation |
method |
Home |
Copyright © 1995-98