Java Insertion into org.omg.CORBA.Any

The following sections give examples of any insertion for a representative sample of CORBA data types. The IDL types used in these examples are taken from Listing 8.1.

Inserting Basic Types

The code in Listing 8.30 shows how basic types are inserted into an any.

Listing 8.30. Java Examples of Inserting Basic Types
// Java //-------------------------------------------------------------------- // Declaration of ' org.omg.CORBA.Any ' // (assume that 'orb', an instance of 'org.omg.CORBA.ORB', is initialized) org.omg.CORBA.Any theAny = org.omg.CORBA.ORB.init().create_any(); //-------------------------------------------------------------------- // Inserting Basic Types // // Inserting a 'short' short s = -123; ...

Get Pure CORBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.