![]() |
![]() |
|
|
IDL-to-Java Mappings Used By the idltojava Compiler
The idltojava compiler reads an OMG IDL interface and translates or maps it to a Java interface. The idltojava 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 IDL/Java Language Mapping.
For more information on the IDL-to-Java mappings, refer to the OMG Web site at http://www.omg.org.
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. The idltojava compiler performs this mapping automatically.
Table 5-1 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.
Note: When a CORBA operation takes a type that corresponds to a Java object type (a string, for example), it is illegal to pass a Java null as the parameter value. Instead, pass an empty version of the designated object type (for example, an empty string or an empty array). A Java null can be passed as a parameter only when the type of the parameter is a CORBA object reference, in which case the null is interpreted as a nil CORBA object reference.
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|