org.eclipse.ocl.examples.domain.types
Class AbstractStandardLibrary
java.lang.Object
org.eclipse.ocl.examples.domain.types.AbstractStandardLibrary
- All Implemented Interfaces:
- DomainStandardLibrary
- Direct Known Subclasses:
- ExecutableStandardLibrary, PivotStandardLibrary
public abstract class AbstractStandardLibrary
- extends java.lang.Object
- implements DomainStandardLibrary
Method Summary |
boolean |
conformsToCollectionType(DomainCollectionType firstCollectionType,
DomainCollectionType secondCollectionType)
|
boolean |
conformsToLambdaType(DomainLambdaType firstLambdaType,
DomainLambdaType secondLambdaType)
|
boolean |
conformsToTupleType(DomainTupleType firstTupleType,
DomainTupleType secondTupleType)
|
void |
dispose()
|
DomainCollectionType |
getBagType(DomainType elementType)
|
DomainCollectionType |
getCollectionType(DomainType elementType)
|
DomainCollectionType |
getCollectionType(DomainType containerType,
DomainType elementType,
IntegerValue lower,
IntegerValue upper)
Return the specialized collection type for the containerType for elementType. |
DomainEnumeration |
getEnumeration(org.eclipse.emf.common.util.Enumerator enumerator)
Return the enumeration for a given enumerator. |
DomainType |
getMetaType(DomainType instanceType)
Returns the meta-type of a given type. |
DomainPackage |
getNestedPackage(DomainPackage parentPackage,
java.lang.String name)
|
DomainType |
getNestedType(DomainPackage parentPackage,
java.lang.String name)
|
DomainPackage |
getNsURIPackage(java.lang.String nsURI)
|
DomainElement |
getOperationTemplateParameter(DomainOperation anOperation,
int index)
|
DomainCollectionType |
getOrderedSetType(DomainType elementType)
|
DomainType |
getPrimitiveType(PrimitiveTypeId typeId)
|
DomainPackage |
getRootPackage(java.lang.String name)
|
DomainCollectionType |
getSequenceType(DomainType elementType)
|
DomainCollectionType |
getSetType(DomainType elementType)
|
boolean |
isEqualToCollectionType(DomainCollectionType firstCollectionType,
DomainCollectionType secondCollectionType)
|
boolean |
isEqualToTupleType(DomainTupleType firstTupleType,
DomainTupleType secondTupleType)
|
protected
|
weakGet(java.util.Map<K,java.lang.ref.WeakReference<V>> map,
K key)
Return the map.get(key).get() entry if there is one or null if not, removing any stale
entry that may be encountered. |
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.DomainStandardLibrary |
getBagType, getBagType, getBooleanType, getCollectionType, getEnumerationType, getInheritance, getIntegerType, getMetaclass, getMetaclassType, getOclAnyType, getOclComparableType, getOclElementType, getOclInvalidType, getOclMessageType, getOclSelfType, getOclSummableType, getOclTupleType, getOclType, getOclVoidType, getOrderedSetType, getOrderedSetType, getRealType, getSequenceType, getSequenceType, getSetType, getSetType, getStringType, getUniqueCollectionType, getUnlimitedNaturalType |
AbstractStandardLibrary
protected AbstractStandardLibrary()
conformsToCollectionType
public boolean conformsToCollectionType(@NonNull
DomainCollectionType firstCollectionType,
@NonNull
DomainCollectionType secondCollectionType)
- Specified by:
conformsToCollectionType
in interface DomainStandardLibrary
conformsToLambdaType
public boolean conformsToLambdaType(@NonNull
DomainLambdaType firstLambdaType,
@NonNull
DomainLambdaType secondLambdaType)
- Specified by:
conformsToLambdaType
in interface DomainStandardLibrary
conformsToTupleType
public boolean conformsToTupleType(@NonNull
DomainTupleType firstTupleType,
@NonNull
DomainTupleType secondTupleType)
- Specified by:
conformsToTupleType
in interface DomainStandardLibrary
dispose
public void dispose()
getBagType
@NonNull
public DomainCollectionType getBagType(@NonNull
DomainType elementType)
getCollectionType
@NonNull
public DomainCollectionType getCollectionType(@NonNull
DomainType elementType)
getCollectionType
@NonNull
public DomainCollectionType getCollectionType(@NonNull
DomainType containerType,
@NonNull
DomainType elementType,
@Nullable
IntegerValue lower,
@Nullable
IntegerValue upper)
- Description copied from interface:
DomainStandardLibrary
- Return the specialized collection type for the containerType for elementType.
- Specified by:
getCollectionType
in interface DomainStandardLibrary
getEnumeration
public DomainEnumeration getEnumeration(@NonNull
org.eclipse.emf.common.util.Enumerator enumerator)
- Description copied from interface:
DomainStandardLibrary
- Return the enumeration for a given enumerator.
- Specified by:
getEnumeration
in interface DomainStandardLibrary
getMetaType
public DomainType getMetaType(@NonNull
DomainType instanceType)
- Description copied from interface:
DomainStandardLibrary
- Returns the meta-type of a given type.
- Specified by:
getMetaType
in interface DomainStandardLibrary
getNestedPackage
@Nullable
public DomainPackage getNestedPackage(@NonNull
DomainPackage parentPackage,
@NonNull
java.lang.String name)
- Specified by:
getNestedPackage
in interface DomainStandardLibrary
getNestedType
@Nullable
public DomainType getNestedType(@NonNull
DomainPackage parentPackage,
@NonNull
java.lang.String name)
- Specified by:
getNestedType
in interface DomainStandardLibrary
getNsURIPackage
@Nullable
public DomainPackage getNsURIPackage(@NonNull
java.lang.String nsURI)
- Specified by:
getNsURIPackage
in interface DomainStandardLibrary
getOperationTemplateParameter
@Nullable
public DomainElement getOperationTemplateParameter(@NonNull
DomainOperation anOperation,
int index)
- Specified by:
getOperationTemplateParameter
in interface DomainStandardLibrary
getOrderedSetType
@NonNull
public DomainCollectionType getOrderedSetType(@NonNull
DomainType elementType)
getPrimitiveType
@Nullable
public DomainType getPrimitiveType(@NonNull
PrimitiveTypeId typeId)
- Specified by:
getPrimitiveType
in interface DomainStandardLibrary
getRootPackage
public DomainPackage getRootPackage(@NonNull
java.lang.String name)
- Specified by:
getRootPackage
in interface DomainStandardLibrary
getSequenceType
@NonNull
public DomainCollectionType getSequenceType(@NonNull
DomainType elementType)
getSetType
@NonNull
public DomainCollectionType getSetType(@NonNull
DomainType elementType)
isEqualToCollectionType
public boolean isEqualToCollectionType(@NonNull
DomainCollectionType firstCollectionType,
@NonNull
DomainCollectionType secondCollectionType)
- Specified by:
isEqualToCollectionType
in interface DomainStandardLibrary
isEqualToTupleType
public boolean isEqualToTupleType(@NonNull
DomainTupleType firstTupleType,
@NonNull
DomainTupleType secondTupleType)
- Specified by:
isEqualToTupleType
in interface DomainStandardLibrary
weakGet
protected <K,V> V weakGet(@NonNull
java.util.Map<K,java.lang.ref.WeakReference<V>> map,
@NonNull
K key)
- Return the map.get(key).get() entry if there is one or null if not, removing any stale
entry that may be encountered.