1. /*
  2. * @(#)DynUnion.java 1.10 00/02/02
  3. *
  4. * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package org.omg.CORBA;
  11. /**
  12. * The <code>DynUnion</code> interface represents a <code>DynAny</code> object
  13. * that is associated with an IDL union.
  14. * Union values can be traversed using the operations defined in <code>DynAny</code>.
  15. * The first component in the union corresponds to the discriminator;
  16. * the second corresponds to the actual value of the union.
  17. * Calling the method <code>next()</code> twice allows you to access both components.
  18. */
  19. public interface DynUnion extends org.omg.CORBA.Object, org.omg.CORBA.DynAny
  20. {
  21. /**
  22. * Determines whether the discriminator associated with this union has been assigned
  23. * a valid default value.
  24. * @return <code>true</code> if the discriminator has a default value;
  25. * <code>false</code> otherwise
  26. */
  27. public boolean set_as_default();
  28. /**
  29. * Determines whether the discriminator associated with this union gets assigned
  30. * a valid default value.
  31. * @param arg <code>true</code> if the discriminator gets assigned a default value
  32. */
  33. public void set_as_default(boolean arg);
  34. /**
  35. * Returns a DynAny object reference that must be narrowed to the type
  36. * of the discriminator in order to insert/get the discriminator value.
  37. * @return a <code>DynAny</code> object reference representing the discriminator value
  38. */
  39. public org.omg.CORBA.DynAny discriminator();
  40. /**
  41. * Returns the TCKind object associated with the discriminator of this union.
  42. * @return the <code>TCKind</code> object associated with the discriminator of this union
  43. */
  44. public org.omg.CORBA.TCKind discriminator_kind();
  45. /**
  46. * Returns a DynAny object reference that is used in order to insert/get
  47. * a member of this union.
  48. * @return the <code>DynAny</code> object representing a member of this union
  49. */
  50. public org.omg.CORBA.DynAny member();
  51. /**
  52. * Allows for the inspection of the name of this union member
  53. * without checking the value of the discriminator.
  54. * @return the name of this union member
  55. */
  56. public String member_name();
  57. /**
  58. * Allows for the assignment of the name of this union member.
  59. * @param arg the new name of this union member
  60. */
  61. public void member_name(String arg);
  62. /**
  63. * Returns the TCKind associated with the member of this union.
  64. * @return the <code>TCKind</code> object associated with the member of this union
  65. */
  66. public org.omg.CORBA.TCKind member_kind();
  67. }