1. /*
  2. * @(#)NotFoundHelper.java 1.6 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. /*
  8. * File: ./org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java
  9. * From: nameservice.idl
  10. * Date: Tue Aug 11 03:12:09 1998
  11. * By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
  12. */
  13. package org.omg.CosNaming.NamingContextPackage;
  14. public class NotFoundHelper {
  15. // It is useless to have instances of this class
  16. private NotFoundHelper() { }
  17. public static void write(org.omg.CORBA.portable.OutputStream out, org.omg.CosNaming.NamingContextPackage.NotFound that) {
  18. out.write_string(id());
  19. org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.write(out, that.why);
  20. {
  21. out.write_long(that.rest_of_name.length);
  22. for (int __index = 0 ; __index < that.rest_of_name.length ; __index += 1) {
  23. org.omg.CosNaming.NameComponentHelper.write(out, that.rest_of_name[__index]);
  24. }
  25. }
  26. }
  27. public static org.omg.CosNaming.NamingContextPackage.NotFound read(org.omg.CORBA.portable.InputStream in) {
  28. org.omg.CosNaming.NamingContextPackage.NotFound that = new org.omg.CosNaming.NamingContextPackage.NotFound();
  29. // read and discard the repository id
  30. in.read_string();
  31. that.why = org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.read(in);
  32. {
  33. int __length = in.read_long();
  34. that.rest_of_name = new org.omg.CosNaming.NameComponent[__length];
  35. for (int __index = 0 ; __index < that.rest_of_name.length ; __index += 1) {
  36. that.rest_of_name[__index] = org.omg.CosNaming.NameComponentHelper.read(in);
  37. }
  38. }
  39. return that;
  40. }
  41. public static org.omg.CosNaming.NamingContextPackage.NotFound extract(org.omg.CORBA.Any a) {
  42. org.omg.CORBA.portable.InputStream in = a.create_input_stream();
  43. return read(in);
  44. }
  45. public static void insert(org.omg.CORBA.Any a, org.omg.CosNaming.NamingContextPackage.NotFound that) {
  46. org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
  47. write(out, that);
  48. a.read_value(out.create_input_stream(), type());
  49. }
  50. private static org.omg.CORBA.TypeCode _tc;
  51. synchronized public static org.omg.CORBA.TypeCode type() {
  52. int _memberCount = 2;
  53. org.omg.CORBA.StructMember[] _members = null;
  54. if (_tc == null) {
  55. _members= new org.omg.CORBA.StructMember[2];
  56. _members[0] = new org.omg.CORBA.StructMember(
  57. "why",
  58. org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.type(),
  59. null);
  60. _members[1] = new org.omg.CORBA.StructMember(
  61. "rest_of_name",
  62. org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CosNaming.NameComponentHelper.type()),
  63. null);
  64. _tc = org.omg.CORBA.ORB.init().create_exception_tc(id(), "NotFound", _members);
  65. }
  66. return _tc;
  67. }
  68. public static String id() {
  69. return "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0";
  70. }
  71. }