Issue 1754: Proposal to change get_value_def in Java mapping (java-rtf) Source: (, ) Nature: Revision Severity: Summary: Summary: The current support for get_value_def in Helper classes in the Java mapping for values is currently has several problems. 1. It cannot work with the singleton ORB, which means that the API is unusable. 2. It requires the generation of the nearly the exact same code in every single value helper which is very wasteful. The new proposal is to remove get_value_def from the Value helper class and add it to the ORB class Resolution: closed issue Revised Text: Actions taken: July 30, 1998: received issue June 4, 1999: closed issue Discussion: End of Annotations:===== Return-Path: Sender: "George Scott" Date: Thu, 30 Jul 1998 11:13:45 -0700 From: "George M. Scott" Organization: Inprise Corporation To: obv-rtf@omg.org CC: java-rtf@omg.org, akv@eng.sun.com, dheisser@eng.sun.com Subject: Proposal to change get_value_def in Java mapping The current support for get_value_def in Helper classes in the Java mapping for values is currently has several problems. 1. It cannot work with the singleton ORB, which means that the API is unusable. 2. It requires the generation of the nearly the exact same code in every single value helper which is very wasteful. The new proposal is to remove get_value_def from the Value helper class and add it to the ORB class. The new signature will appear as follows: package org.omg.CORBA.ORB; abstract public class ORB { ... public org.omg.CORBA.ValueDef get_value_def(String repid) { throw new org.omg.CORBA.NO_IMPLEMENT(); } ... } This function returns the ValueDef for the specified repid by querying the Interface Repository. If the repid specified does not correspond to a value type, then a BAD_PARAM exception is thrown. Previously a user would have to invoke the following code to get a ValueDef for a Foo value (assuming we pass in an ORB instance to fix the broken API): ValueDef vd = FooHelper.get_value_def(orb); The new could would appear as follows: ValueDef vd = orb.get_value_def(FooHelper.id()); George