Issue 4064: Any extract operations for tk_abstract_interface (java-rtf) Source: (Mr. Simon C. Nash, ) Nature: Uncategorized Issue Severity: Summary: It is not clear from the IDL to Java language mapping spec whether a valuetype or object reference can be inserted into an "any" whose TypeCode is tk_abstract_interface. Neither is it clear whether a valuetype or object reference that has been passed across the wire inside an "any" with a tk_abstract_interface TypeCode can be extracted using the normal extract operations for valuetype or object reference. Proposed resolution: Add the following text to section 1.16: An object reference can be inserted into an "any" that has a matching tk_objref TypeCode. If the object reference inherits from an abstract interface, then it can also be inserted into an "any" that has a matching tk_abstract_interface TypeCode. A nil object reference can be inserted into any "any" that has a tk_objref or tk_abstract_interface TypeCode. A valuetype can be inserted into an "any" that has a matching tk_value or tk_value_box TypeCode. If the valuetype supports an abstract interface, then it can also be inserted into an "any" that has a matching tk_abstract_interface TypeCode. A null valuetype can be inserted into any "any" that has a tk_value, tk_value_box, or tk_abstract_interface TypeCode. The extract_Object operation can be used to extract an object reference (including a nil object reference) from an "any" that has a TypeCode of tk_objref. It can also be used to extract an object reference (including a nil object reference) from an "any" that has a TypeCode of tk_abstract_interface and a boolean discriminator of true. The extract_Value operation can be used to extract a valuetype (including a null valuetype) from an "any" that has a TypeCode of tk_value or tk_value_box. It can also be used to extract a valuetype (including a null valuetype) from an "any" that has a TypeCode of tk_abstract_interface and a boolean discriminator of false. Resolution: Incorporate changes from Simon's proposal and close issue Revised Text: Add the following text to section 1.16 after the paragraph that begins "The insert and extract methods for Serializables...": An object reference can be inserted into an "any" that has a matching tk_objref TypeCode. If the object reference inherits from an abstract interface, then it can also be inserted into an "any" that has a matching tk_abstract_interface TypeCode. A nil object reference can be inserted into any "any" that has a tk_objref or tk_abstract_interface TypeCode. A valuetype can be inserted into an "any" that has a matching tk_value or tk_value_box TypeCode. If the valuetype supports an abstract interface, then it can also be inserted into an "any" that has a matching tk_abstract_interface TypeCode. A null valuetype can be inserted into any "any" that has a tk_value, tk_value_box, or tk_abstract_interface TypeCode. The extract_Object operation can be used to extract an object reference (including a nil object reference) from an "any" that has a TypeCode of tk_objref. It can also be used to extract an object reference (including a nil object reference) from an "any" that has a TypeCode of tk_abstract_interface and a boolean discriminator of true. The extract_Value operation can be used to extract a valuetype (including a null valuetype) from an "any" that has a TypeCode of tk_value or tk_value_box. It can also be used to extract a valuetype (including a null valuetype) from an "any" that has a TypeCode of tk_abstract_interface and a boolean discriminator of false. Actions taken: November 18, 2000: received issue May 13, 2002: closed issue Discussion: End of Annotations:===== Date: Sat, 18 Nov 2000 21:43:54 +0000 From: Simon Nash Organization: IBM X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en MIME-Version: 1.0 To: issues@omg.org CC: java-rtf@omg.org Subject: Any extract operations for tk_abstract_interface Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: Fibd9coZ!!]VB!!J8Je9 It is not clear from the IDL to Java language mapping spec whether a valuetype or object reference can be inserted into an "any" whose TypeCode is tk_abstract_interface. Neither is it clear whether a valuetype or object reference that has been passed across the wire inside an "any" with a tk_abstract_interface TypeCode can be extracted using the normal extract operations for valuetype or object reference. Proposed resolution: Add the following text to section 1.16: An object reference can be inserted into an "any" that has a matching tk_objref TypeCode. If the object reference inherits from an abstract interface, then it can also be inserted into an "any" that has a matching tk_abstract_interface TypeCode. A nil object reference can be inserted into any "any" that has a tk_objref or tk_abstract_interface TypeCode. A valuetype can be inserted into an "any" that has a matching tk_value or tk_value_box TypeCode. If the valuetype supports an abstract interface, then it can also be inserted into an "any" that has a matching tk_abstract_interface TypeCode. A null valuetype can be inserted into any "any" that has a tk_value, tk_value_box, or tk_abstract_interface TypeCode. The extract_Object operation can be used to extract an object reference (including a nil object reference) from an "any" that has a TypeCode of tk_objref. It can also be used to extract an object reference (including a nil object reference) from an "any" that has a TypeCode of tk_abstract_interface and a boolean discriminator of true. The extract_Value operation can be used to extract a valuetype (including a null valuetype) from an "any" that has a TypeCode of tk_value or tk_value_box. It can also be used to extract a valuetype (including a null valuetype) from an "any" that has a TypeCode of tk_abstract_interface and a boolean discriminator of false. Simon -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb