/*
 * @(#)TargetAddress.java	1.5 01/12/03
 *
 * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.sun.corba.se.internal.iiop.messages;


/**
* com/sun/corba/se/internal/iiop/messages/TargetAddress.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from ../../../../../../../src/share/classes/com/sun/corba/se/GiopIDL/g.idl
* Sunday, June 4, 2000 5:18:54 PM PDT
*/

public final class TargetAddress implements org.omg.CORBA.portable.IDLEntity
{
  private byte[] ___object_key;
  private org.omg.IOP.TaggedProfile ___profile;
  private com.sun.corba.se.internal.iiop.messages.IORAddressingInfo ___ior;
  private short __discriminator;
  private boolean __uninitialized = true;

  public TargetAddress ()
  {
  }

  public short discriminator ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    return __discriminator;
  }

  public byte[] object_key ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyobject_key (__discriminator);
    return ___object_key;
  }

  public void object_key (byte[] value)
  {
    __discriminator = com.sun.corba.se.internal.iiop.messages.KeyAddr.value;
    ___object_key = value;
    __uninitialized = false;
  }

  private void verifyobject_key (short discriminator)
  {
    if (discriminator != com.sun.corba.se.internal.iiop.messages.KeyAddr.value)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public org.omg.IOP.TaggedProfile profile ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyprofile (__discriminator);
    return ___profile;
  }

  public void profile (org.omg.IOP.TaggedProfile value)
  {
    __discriminator = com.sun.corba.se.internal.iiop.messages.ProfileAddr.value;
    ___profile = value;
    __uninitialized = false;
  }

  private void verifyprofile (short discriminator)
  {
    if (discriminator != com.sun.corba.se.internal.iiop.messages.ProfileAddr.value)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public com.sun.corba.se.internal.iiop.messages.IORAddressingInfo ior ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyior (__discriminator);
    return ___ior;
  }

  public void ior (com.sun.corba.se.internal.iiop.messages.IORAddressingInfo value)
  {
    __discriminator = com.sun.corba.se.internal.iiop.messages.ReferenceAddr.value;
    ___ior = value;
    __uninitialized = false;
  }

  private void verifyior (short discriminator)
  {
    if (discriminator != com.sun.corba.se.internal.iiop.messages.ReferenceAddr.value)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public void _default ()
  {
    __discriminator = -32768;
    __uninitialized = false;
  }

} // class TargetAddress
