ns = new _NamingContextStub(delegate);
ns = new _NamingContextStub(); ((_NamingContextStub) ns)._set_delegate(delegate);
  private org.omg.CORBA.Object resolve(org.omg.CORBA.Object object)  {    NamingContext ns;    String key = "?";    try      {        if (object instanceof NamingContext)          ns = (NamingContext) object;        else          {            Delegate delegate = ((ObjectImpl) object)._get_delegate();            ns = new _NamingContextStub(delegate);          }      }    catch (Exception ex)      {        BAD_PARAM bad = new BAD_PARAM("The CORBANAME target " + object          + " is not a NamingContext");        bad.minor = 10;        bad.initCause(ex);        throw bad;      }    if (converter == null)      converter = new NameTransformer();    try      {        key = readKey("#");        object = ns.resolve(converter.toName(key));        return object;      }    catch (Exception ex)      {        BAD_PARAM bad = new BAD_PARAM("Wrong CORBANAME '" + key + "'");        bad.minor = 10;        bad.initCause(ex);        throw bad;      }  }