Issue 2565: Mapping of Java constructors to init is broken (java2idl-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: The Java to IDL mapping specifies that Java constructors are mapped to IDL initializers. Now that core RTF issue 1981 has replaced IDL initializers by factory methods, this mapping is broken and inconsistent with the core chapters. Resolution: Revised Text: Actions taken: March 31, 1999: received issue May 16, 2006: closed issue Discussion: End of Annotations:===== Date: Wed, 31 Mar 1999 15:28:42 +0100 From: Simon Nash Organization: IBM To: issues@omg.org CC: java2idl-rtf@omg.org Subject: Mapping of Java constructors to init is broken The Java to IDL mapping specifies that Java constructors are mapped to IDL initializers. Now that core RTF issue 1981 has replaced IDL initializers by factory methods, this mapping is broken and inconsistent with the core chapters. Proposed resolution: If there is a single Java constructor, map it to an IDL factory method called "create". If there is more than one Java constructor, use the same name mangling as overloaded methods. For example, the Java classes // Java public class foo implements java.io.Serializable { foo(int x); } public class bar implements java.io.Serializable { foo(int x); foo(char y); } would map to the IDL valuetypes // IDL valuetype foo { factory create(in long x); }; valuetype bar { factory create__long(in long x); factory create__wchar(in long y); }; 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