net.sf.farrago.cwm.datatypes
Interface CwmEnumerationLiteralClass

All Superinterfaces:
RefBaseObject, RefClass, RefFeatured
All Known Implementing Classes:
CwmEnumerationLiteralClass$Hib

public interface CwmEnumerationLiteralClass
extends RefClass

EnumerationLiteral class proxy interface. EnumerationLiteral instances describe the enumeration identifiers, and possibly the values, associated with an enumerated data type. Enumeration identifiers are contained in the name attribute derived from the EnumerationLiteral instance?s ModelElement superclass. EnumerationLiteral instances may also be used to define expression-based values such as ranges. To do so, simply state the membership expression in the instance?s value. For example, a range literal can be created by setting the value attribute to "m..n", where m represents the lower bound of the range, and n, the upper bound. In this way, ranges and other more complicated expressions can be intermixed with simple enumeration literals. For example, an enumeration might contain the literals "1", "2", "4..7", and "> 10". Consequently, a simple range data type can be created with an Enumeration instance that owns a single EnumerationLiteral instance. For example, a data type for positive integers could be created as shown in the following instance diagram. A model attribute of this data type might then be declared as "posInt : PositiveInteger".

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
 CwmEnumerationLiteral createCwmEnumerationLiteral()
          The default factory operation used to create an instance object.
 CwmEnumerationLiteral createCwmEnumerationLiteral(String name, VisibilityKind visibility, CwmExpression value)
          Creates an instance object having attributes initialized by the passed values.
 
Methods inherited from interface javax.jmi.reflect.RefClass
refAllOfClass, refAllOfType, refCreateInstance, refCreateStruct, refCreateStruct, refGetEnum, refGetEnum
 
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

createCwmEnumerationLiteral

CwmEnumerationLiteral createCwmEnumerationLiteral()
The default factory operation used to create an instance object.

Returns:
The created instance object.

createCwmEnumerationLiteral

CwmEnumerationLiteral createCwmEnumerationLiteral(String name,
                                                  VisibilityKind visibility,
                                                  CwmExpression value)
Creates an instance object having attributes initialized by the passed values.

Parameters:
name - An identifier for the ModelElement within its containing Namespace.
visibility - Specifies extent of the visibility of the ModelElement within its owning Namespace.
value - The value associated with an enumeration identifier can be stored here. The attribute is optional because enumeration literals are not required to have a specific, displayable value. This is indicated by either an empty value attribute or a value attribute value whose expression body attribute is a zero-length string.
Returns:
The created instance object.