org.jacorb.orb.dynany

Class DynUnion

public final class DynUnion extends DynAny implements DynUnion

CORBA DynUnion

Version: $Id: DynUnion.java,v 1.29 2006/07/05 09:18:11 alphonse.bendt Exp $

Author: Gerald Brose

Method Summary
intcomponent_count()
Overrides component_count() in DynAny
DynAnycurrent_component()
voiddestroy()
TCKinddiscriminator_kind()
booleanequal(DynAny dyn_any)
Overrides equal() in DynAny
voidfrom_any(Any value)
Overrides from_any() in DynAny
DynAnyget_discriminator()
booleanhas_no_active_member()
DynAnymember()
TCKindmember_kind()
Stringmember_name()
booleannext()
Overrides next() in DynAny
booleanseek(int index)
Overrides seek() in DynAny
voidset_discriminator(DynAny dynAny)
sets the discriminator to d
voidset_to_default_member()
sets the discriminator to a value that is consistent with the value of the default case of a union; it sets the current position to zero and causes component_count to return 2.
voidset_to_no_active_member()
sets the discriminator to a value that does not correspond to any of the union's case labels; it sets the current position to zero and causes component_count to return 1.
Anyto_any()

Method Detail

component_count

public int component_count()
Overrides component_count() in DynAny

current_component

public DynAny current_component()

destroy

public void destroy()

discriminator_kind

public TCKind discriminator_kind()

Returns: the TCKind value of the discriminator's TypeCode.

equal

public boolean equal(DynAny dyn_any)
Overrides equal() in DynAny

from_any

public void from_any(Any value)
Overrides from_any() in DynAny

get_discriminator

public DynAny get_discriminator()

Returns: the current discriminator value

has_no_active_member

public boolean has_no_active_member()

Returns: true, if the union has no active member (that is, the union's value consists solely of its discriminator because the discriminator has a value that is not listed as an explicit case label). Calling this operation on a union that has a default case returns false. Calling this operation on a union that uses the entire range of discriminator values for explicit case labels returns false.

member

public DynAny member()

Returns: the currently active member.

Throws: InvalidValue if the union has no active member

member_kind

public TCKind member_kind()

Returns: the TypeCode kind of the currently active member.

Throws: InvalidValue if the union has no active member

member_name

public String member_name()

Returns: the name of the currently active member.

Throws: InvalidValue if the union has no active member

next

public boolean next()
Overrides next() in DynAny

seek

public boolean seek(int index)
Overrides seek() in DynAny

set_discriminator

public void set_discriminator(DynAny dynAny)
sets the discriminator to d

Throws: TypeMismatch if the TypeCode of the d parameter is not equivalent to the TypeCode of the union's discriminator

set_to_default_member

public void set_to_default_member()
sets the discriminator to a value that is consistent with the value of the default case of a union; it sets the current position to zero and causes component_count to return 2.

Throws: TypeMismatch if the union does not have an explicit default case.

set_to_no_active_member

public void set_to_no_active_member()
sets the discriminator to a value that does not correspond to any of the union's case labels; it sets the current position to zero and causes component_count to return 1.

Throws: TypeMismatch if the union has an explicit default case or uses the entire range of discriminator values for explicit case labels.

to_any

public Any to_any()

Returns: an Any that holds a copy of this union