The IDLjavaObject class creates an IDL object that encapsulates a Java object. IDL provides data type and other translation services, allowing IDL programs to access the Java object’s methods and properties using standard IDL syntax.
Note: Additional information on using Java objects in IDL can be found in Using Java Objects in IDL.
Superclasses
None
Creation
See IDLjavaObject::Init.
Properties
The properties of this object depends on which Java object the IDLjavaObject class encapsulates. See IDLjavaObject Properties for more details.
Methods
This class has the following methods:
In addition to these methods, you can call the underlying Java object’s methods directly.
Note: The IDL object system uses method names to identify and call object lifecycle methods (Init and Cleanup). If the Java object underlying IDLjavaObject implements Init or Cleanup methods, they will be overridden by IDL’s lifecycle methods; the Java object’s methods will be inaccessible from IDL. Similarly, IDL implements the GetProperty and SetProperty methods for IDLjavaObject, so any methods of the underlying Java object that use these names will be inaccessible from IDL. In Java, you can wrap these methods with different named methods to work around this limitation.
When a function, procedure, or Init method is called with an array as a parameter, the array is copied from IDL into Java space according to the data conversion rules. After the Java call returns, any Java arrays are copied back to IDL arrays. The IDL array type after the back-copy will be the same type as that of the IDL array before the call.
Note: The SetProperty method does not copy arrays back from Java.
Note that this back-copy could cause some downcasting. For example, if you have an array of IDL bytes, you can call a Java method that accepts an array of longs. When the data are back-copied, the array of longs is cast to an array of bytes. If the Java method has changed one of the longs to a value greater than 255 (the upper limit of a byte), the long will be cast to some unexpected value. To avoid downcasting issues, IDL-Java programmers should know their data and make sure types in IDL and Java match as closely as possible.
Examples
Version History