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

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.types.AbstractType
      extended by org.eclipse.ocl.examples.domain.types.AbstractSpecializedType
          extended by org.eclipse.ocl.examples.domain.types.AbstractMetaclass
All Implemented Interfaces:
DomainElement, DomainMetaclass, DomainNamedElement, DomainNamespace, DomainType, Nameable, OCLValue

public class AbstractMetaclass
extends AbstractSpecializedType
implements DomainMetaclass


Field Summary
protected  DomainType instanceType
           
protected  TypeId typeId
           
 
Fields inherited from class org.eclipse.ocl.examples.domain.types.AbstractSpecializedType
containerType
 
Fields inherited from class org.eclipse.ocl.examples.domain.types.AbstractType
name, standardLibrary
 
Constructor Summary
AbstractMetaclass(DomainStandardLibrary standardLibrary, DomainType instanceType)
           
 
Method Summary
 boolean conformsTo(DomainStandardLibrary standardLibrary, DomainType type)
          Return true if this type conform to thatType within standardLibrary.
 boolean equals(java.lang.Object obj)
           
 DomainType getCommonType(IdResolver idResolver, DomainType type)
          Return the most derived type com mon to this type and thatType within standardLibrary.
 DomainType getInstanceType()
           
protected  DomainType getMetaType()
           
protected  DomainType getNormalizedInstanceType()
           
 TypeId getTypeId()
          Return a unique StandardLibrary-independent identifier for this type.
 int hashCode()
           
 boolean isEqualTo(DomainStandardLibrary standardLibrary, DomainType type)
          Return true if this is the same type as thatType within standardLibrary.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.types.AbstractSpecializedType
getContainerType, isOrdered, isUnique, lookupImplementation
 
Methods inherited from class org.eclipse.ocl.examples.domain.types.AbstractType
createInstance, createInstance, getInheritance, getLocalOperations, getLocalProperties, getLocalSuperTypes, getMetaTypeName, getName, getNormalizedType, getOwnedAttribute, getOwnedInvariant, getOwnedOperation, getOwnedRule, getPackage, getStandardLibrary, getTypeParameters, isEqualToUnspecializedType, isInvalid, oclEquals, oclHashCode, specializeIn
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainMetaclass
getContainerType
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainType
createInstance, createInstance, getInheritance, getLocalOperations, getLocalProperties, getLocalSuperTypes, getMetaTypeName, getName, getNormalizedType, getOwnedAttribute, getOwnedInvariant, getOwnedOperation, getPackage, getTypeParameters, isEqualToUnspecializedType, isInvalid, isOrdered, isUnique, lookupImplementation, specializeIn
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainNamespace
getOwnedRule
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OCLValue
oclEquals, oclHashCode
 

Field Detail

instanceType

@NonNull
protected final DomainType instanceType

typeId

@NonNull
protected final TypeId typeId
Constructor Detail

AbstractMetaclass

public AbstractMetaclass(@NonNull
                         DomainStandardLibrary standardLibrary,
                         @NonNull
                         DomainType instanceType)
Method Detail

conformsTo

public boolean conformsTo(@NonNull
                          DomainStandardLibrary standardLibrary,
                          @NonNull
                          DomainType type)
Description copied from interface: DomainType
Return true if this type conform to thatType within standardLibrary.

Specified by:
conformsTo in interface DomainType

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getCommonType

@NonNull
public DomainType getCommonType(@NonNull
                                        IdResolver idResolver,
                                        @NonNull
                                        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
Specified by:
getCommonType in class AbstractType

getInstanceType

public DomainType getInstanceType()
Specified by:
getInstanceType in interface DomainMetaclass

getMetaType

@Nullable
protected DomainType getMetaType()

getNormalizedInstanceType

@NonNull
protected DomainType getNormalizedInstanceType()

getTypeId

@NonNull
public TypeId getTypeId()
Description copied from interface: DomainType
Return a unique StandardLibrary-independent identifier for this type.

Specified by:
getTypeId in interface DomainType
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isEqualTo

public boolean isEqualTo(@NonNull
                         DomainStandardLibrary standardLibrary,
                         @NonNull
                         DomainType type)
Description copied from interface: DomainType
Return true if this is the same type as thatType within standardLibrary.

Specified by:
isEqualTo in interface DomainType

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object