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