org.eclipse.ocl.examples.domain.types
Class AbstractType

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.types.AbstractType
All Implemented Interfaces:
DomainElement, DomainType
Direct Known Subclasses:
AbstractSpecializedType, AbstractTupleType, ExecutorLambdaType, ExecutorSpecializedType, ExecutorTypeParameter

public abstract class AbstractType
extends java.lang.Object
implements DomainType


Field Summary
protected  java.lang.String name
           
protected  DomainStandardLibrary standardLibrary
           
 
Constructor Summary
AbstractType(DomainStandardLibrary standardLibrary, java.lang.String name)
           
 
Method Summary
 ObjectValue createInstance(ValueFactory valueFactory)
          Return a new instance of this type from valueFactory.
 Value createInstance(ValueFactory valueFactory, java.lang.String value)
          Return a new instance of this data type from valueFactory.
abstract  DomainType getCommonType(DomainStandardLibrary standardLibrary, DomainType type)
          Return the most derived type com mon to this type and thatType within standardLibrary.
 DomainInheritance getInheritance(DomainStandardLibrary standardLibrary)
          Return the inheritance description for this type within standardLibrary.
 java.lang.Iterable<? extends DomainOperation> getLocalOperations()
           
 java.lang.Iterable<? extends DomainProperty> getLocalProperties()
           
 java.lang.Iterable<? extends DomainType> getLocalSuperTypes()
           
 java.lang.String getMetaTypeName()
          Return the name of the meta-type of this type.
 java.lang.String getName()
          Return the name of this type (without any decoratuions for specializations).
 DomainType getNormalizedType(DomainStandardLibrary standardLibrary)
          Return the unique executable form of this type within standardLibrary.
 DomainPackage getPackage()
          Return the package containing this type.
 DomainStandardLibrary getStandardLibrary()
           
 boolean isEqualToUnspecializedType(DomainStandardLibrary standardLibrary, DomainType type)
           
 boolean isOrdered()
          Return true if this type is a Collection type and has ordered elements.
 boolean isUnique()
          Return true if this type is a Collection type and has unique elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainType
conformsTo, isEqualTo, lookupImplementation
 

Field Detail

standardLibrary

protected final DomainStandardLibrary standardLibrary

name

protected final java.lang.String name
Constructor Detail

AbstractType

public AbstractType(DomainStandardLibrary standardLibrary,
                    java.lang.String name)
Method Detail

createInstance

public ObjectValue createInstance(ValueFactory valueFactory)
Description copied from interface: DomainType
Return a new instance of this type from valueFactory. Properties may be initialised using DomainProperty.setValue(ObjectValue, Value) provided no side-effect free OCL functionality is permitted to use the ObjectValue until initialisation has completed.

Specified by:
createInstance in interface DomainType

createInstance

public Value createInstance(ValueFactory valueFactory,
                            java.lang.String value)
Description copied from interface: DomainType
Return a new instance of this data type from valueFactory.

Specified by:
createInstance in interface DomainType
value - string initial value

getCommonType

public abstract DomainType getCommonType(DomainStandardLibrary standardLibrary,
                                         DomainType type)
Description copied from interface: DomainType
Return the most derived type com mon to this type and thatType within standardLibrary.

Specified by:
getCommonType in interface DomainType

getInheritance

public DomainInheritance getInheritance(DomainStandardLibrary standardLibrary)
Description copied from interface: DomainType
Return the inheritance description for this type within standardLibrary.

Specified by:
getInheritance in interface DomainType

getLocalOperations

public java.lang.Iterable<? extends DomainOperation> getLocalOperations()
Specified by:
getLocalOperations in interface DomainType

getLocalProperties

public java.lang.Iterable<? extends DomainProperty> getLocalProperties()
Specified by:
getLocalProperties in interface DomainType

getLocalSuperTypes

public java.lang.Iterable<? extends DomainType> getLocalSuperTypes()
Specified by:
getLocalSuperTypes in interface DomainType

getMetaTypeName

public java.lang.String getMetaTypeName()
Description copied from interface: DomainType
Return the name of the meta-type of this type.

Specified by:
getMetaTypeName in interface DomainType

getName

public final java.lang.String getName()
Description copied from interface: DomainType
Return the name of this type (without any decoratuions for specializations).

Specified by:
getName in interface DomainType

getNormalizedType

public DomainType getNormalizedType(DomainStandardLibrary standardLibrary)
Description copied from interface: DomainType
Return the unique executable form of this type within standardLibrary.

Specified by:
getNormalizedType in interface DomainType

getPackage

public DomainPackage getPackage()
Description copied from interface: DomainType
Return the package containing this type.

Specified by:
getPackage in interface DomainType

getStandardLibrary

public final DomainStandardLibrary getStandardLibrary()

isEqualToUnspecializedType

public boolean isEqualToUnspecializedType(DomainStandardLibrary standardLibrary,
                                          DomainType type)
Specified by:
isEqualToUnspecializedType in interface DomainType

isOrdered

public boolean isOrdered()
Description copied from interface: DomainType
Return true if this type is a Collection type and has ordered elements.

Specified by:
isOrdered in interface DomainType

isUnique

public boolean isUnique()
Description copied from interface: DomainType
Return true if this type is a Collection type and has unique elements.

Specified by:
isUnique in interface DomainType