net.sf.farrago.cwm.datatypes
Interface CwmUnion

All Superinterfaces:
CwmClassifier, CwmElement, CwmModelElement, CwmNamespace, RefBaseObject, RefFeatured, RefObject
All Known Implementing Classes:
CwmUnion$Hib

public interface CwmUnion
extends CwmClassifier

Union object instance interface. The Union class represents programming language unions and similarly structured data types. Because of the diversity of union semantics found across software systems, the Union and UnionMember classes are likely candidates for specialization to better capture union semantics in specific language extension packages. A discriminated Union has a collection of UnionMembers that determine the sets of contents that the Union may contain. Such Unions have an attribute called the discriminator that identifies the memberCase value of the UnionMember that the Union currently contains. The discriminator is found via the UnionDiscriminator association to StructuralFeature. The discriminator may be embedded within UnionMembers or may be located outside the discriminator. If it is located within UnionMembers, the discriminator should occur in every UnionMember at the same location (often, the first). Undiscriminated unions (for example, a C language union) are also supported, but have an empty discriminator reference, and the memberCase attribute of the UnionMembers it contains is ignored. Undiscriminated Unions are often used to represent alternate views of a single physical storage area. A fine degree of control over this aspect of Unions may be obtained by creating a class that derives from both UnionMember and FixedOffsetField (in the CWM Record package) and setting the offset attribute instances of that class accordingly.

Note: This type should not be subclassed, implemented or directly instantiated by clients. It is generated from a MOF metamodel and implemented by Enki or MDR.


Method Summary
 CwmStructuralFeature getDiscriminator()
          Returns the value of reference discriminator.
 void setDiscriminator(CwmStructuralFeature newValue)
          Sets the value of discriminator reference.
 
Methods inherited from interface net.sf.farrago.cwm.core.CwmClassifier
getFeature, isAbstract, setAbstract
 
Methods inherited from interface net.sf.farrago.cwm.core.CwmNamespace
getOwnedElement
 
Methods inherited from interface net.sf.farrago.cwm.core.CwmModelElement
getClientDependency, getConstraint, getImporter, getName, getNamespace, getVisibility, setName, setNamespace, setVisibility
 
Methods inherited from interface javax.jmi.reflect.RefObject
refClass, refDelete, refImmediateComposite, refIsInstanceOf, refOutermostComposite
 
Methods inherited from interface javax.jmi.reflect.RefFeatured
refGetValue, refGetValue, refInvokeOperation, refInvokeOperation, refSetValue, refSetValue
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Method Detail

getDiscriminator

CwmStructuralFeature getDiscriminator()
Returns the value of reference discriminator.

Returns:
Value of reference discriminator.

setDiscriminator

void setDiscriminator(CwmStructuralFeature newValue)
Sets the value of discriminator reference. See getDiscriminator() for description on the attribute.

Parameters:
newValue - New value to be set.