diff options
Diffstat (limited to 'libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java')
-rw-r--r-- | libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java index 2ff8c226a82..70f9a4913ba 100644 --- a/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java +++ b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java @@ -64,40 +64,40 @@ public abstract class OutputStream extends org.omg.CORBA.portable.OutputStream { /** - * Writes an abstract interface to the stream. An abstract interface can - * be eithe CORBA object or value type and is written as a union with - * the boolean discriminator (false for objects, true for value types). - * - * The object from value is separated by fact that all values implement - * the {@link ValueBase} interface. Also, the passed parameter is treated - * as value it it does not implement CORBA Object. - * + * Writes an abstract interface to the stream. An abstract interface can be + * eithe CORBA object or value type and is written as a union with the boolean + * discriminator (false for objects, true for value types). + * + * The object from value is separated by fact that all values implement the + * {@link ValueBase} interface. Also, the passed parameter is treated as value + * it it does not implement CORBA Object. + * * @param an_interface an abstract interface to write. */ public void write_abstract_interface(java.lang.Object an_interface) { - boolean isValue = - an_interface instanceof ValueBase || - (!(an_interface instanceof org.omg.CORBA.Object)); + boolean isObject = !(an_interface instanceof ValueBase) + && an_interface instanceof org.omg.CORBA.Object; - write_boolean(isValue); + write_boolean(isObject); - if (isValue) - write_value((ValueBase) an_interface); - else + if (isObject) write_Object((org.omg.CORBA.Object) an_interface); + else + write_value((Serializable) an_interface); + } /** * Writes a value type into the output stream. - * - * The value type must implement either {@link CustomValue} - * (for user-defined writing method) or {@link StramableValue} - * (for standard writing using code, generated by IDL compiler). - * - * The written record will have a repository id, matching the - * class of the passed object. The codebase will not be written. - * + * + * The value type must implement either {@link CustomValue} (for user-defined + * writing method) or {@link StramableValue} (for standard writing using code, + * generated by IDL compiler). + * + * The written record will have a repository id, matching the class of the + * passed object. The codebase will not be written. + * * @param value a value type object to write. */ public void write_value(Serializable value) @@ -124,7 +124,9 @@ public abstract class OutputStream * Writes a value type into the output stream, stating it is an * instance of the given class. The written record * will have a repository id, matching the passed class. - * The codebase will not be written. + * The codebase will not be written. It the object + * being written is an instance of the different class, this results + * writing two Id inheritance hierarchy. * * The value type must implement either {@link CustomValue} * (for user-defined writing method) or {@link StramableValue} @@ -138,15 +140,15 @@ public abstract class OutputStream } /** - * Writes a value type into the output stream, - * stating it has the given repository id. - * - * The value type must implement either {@link CustomValue} - * (for user-defined writing method) or {@link StramableValue} - * (for standard writing using code, generated by IDL compiler). - * + * Writes a value type into the output stream, stating it has the given + * repository id. + * + * The value type must implement either {@link CustomValue} (for user-defined + * writing method) or {@link StramableValue} (for standard writing using code, + * generated by IDL compiler). + * * @param repository_id a repository id of the value type. - * + * * @param value a value type object to write. */ public void write_value(Serializable value, String repository_id) |