public abstract class AbstractInheritance extends java.lang.Object implements DomainInheritance
Modifier and Type | Class and Description |
---|---|
static class |
AbstractInheritance.FragmentIterable |
static class |
AbstractInheritance.RejectStaticOperation |
static class |
AbstractInheritance.RejectStaticProperty |
static class |
AbstractInheritance.SelectStaticOperation |
static class |
AbstractInheritance.SelectStaticProperty |
Modifier and Type | Field and Description |
---|---|
protected DomainPackage |
evaluationPackage |
protected int |
flags |
protected java.lang.String |
name |
protected java.util.Map<java.lang.String,DomainOperation> |
operationMap |
static int |
ORDERED |
protected java.util.Map<java.lang.String,DomainProperty> |
propertyMap |
static com.google.common.base.Predicate<DomainOperation> |
REJECT_STATIC_OPERATION |
static com.google.common.base.Predicate<DomainProperty> |
REJECT_STATIC_PROPERTY |
static com.google.common.base.Predicate<DomainOperation> |
SELECT_STATIC_OPERATION |
static com.google.common.base.Predicate<DomainProperty> |
SELECT_STATIC_PROPERTY |
static int |
UNIQUE |
EMPTY_ARRAY
Constructor and Description |
---|
AbstractInheritance(java.lang.String name,
DomainPackage evaluationPackage,
int flags) |
Modifier and Type | Method and Description |
---|---|
boolean |
conformsTo(DomainStandardLibrary standardLibrary,
DomainType type)
Return true if this type conform to thatType within standardLibrary.
|
DomainInheritance |
getCommonInheritance(DomainInheritance thatInheritance) |
DomainType |
getCommonType(IdResolver idResolver,
DomainType type)
Return the most derived type com mon to this type and thatType within standardLibrary.
|
DomainFragment |
getFragment(DomainInheritance thatInheritance) |
DomainInheritance |
getInheritance(DomainStandardLibrary standardLibrary)
Return the inheritance description for this type within standardLibrary.
|
DomainOperation |
getMemberOperation(OperationId operationId) |
java.lang.String |
getName()
Return the name of this type (without any decorations for specializations).
|
DomainType |
getNormalizedType(DomainStandardLibrary standardLibrary)
Return the unique executable form of this type within standardLibrary.
|
protected DomainInheritance |
getOclAnyInheritance() |
java.util.List<? extends DomainConstraint> |
getOwnedInvariant() |
java.util.List<? extends DomainConstraint> |
getOwnedRule() |
DomainPackage |
getPackage()
Return the package containing this type.
|
static void |
initStatics()
A simple public static method that may be used to force class initialization.
|
boolean |
isEqualTo(DomainStandardLibrary standardLibrary,
DomainType type)
Return true if this is the same type as thatType within standardLibrary.
|
boolean |
isEqualToUnspecializedType(DomainStandardLibrary standardLibrary,
DomainType type) |
boolean |
isInvalid()
Return true if this is an invalid type (with an associated error message).
|
boolean |
isOrdered()
Return true if this type is a Collection type and has ordered elements.
|
boolean |
isSubInheritanceOf(DomainInheritance thatInheritance) |
boolean |
isSuperInheritanceOf(DomainStandardLibrary standardLibrary,
DomainInheritance thatInheritance) |
boolean |
isUndefined() |
boolean |
isUnique()
Return true if this type is a Collection type and has unique elements.
|
LibraryFeature |
lookupImplementation(DomainStandardLibrary standardLibrary,
DomainOperation staticOperation)
Return the dynamic (overloaded) implementation of the staticOperation applicable to the types managed
by the given Standard Library.
|
DomainOperation |
lookupLocalOperation(DomainStandardLibrary standardLibrary,
java.lang.String operationName,
DomainInheritance... argumentTypes) |
boolean |
oclEquals(OCLValue thatValue)
Return true if this is an equivalent OCL value to thatValue.
|
int |
oclHashCode() |
DomainType |
specializeIn(DomainCallExp expr,
DomainType selfType) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllOperations, getAllProperties, getAllSuperFragments, getDepth, getFragment, getIndex, getIndexes, getMemberProperty, getSelfFragment, getStandardLibrary, getSuperFragments
createInstance, createInstance, getLocalOperations, getLocalProperties, getLocalSuperTypes, getMetaTypeName, getOwnedAttribute, getOwnedOperation, getTypeId, getTypeParameters
public static final com.google.common.base.Predicate<DomainOperation> REJECT_STATIC_OPERATION
public static final com.google.common.base.Predicate<DomainProperty> REJECT_STATIC_PROPERTY
public static final com.google.common.base.Predicate<DomainOperation> SELECT_STATIC_OPERATION
public static final com.google.common.base.Predicate<DomainProperty> SELECT_STATIC_PROPERTY
public static final int ORDERED
public static final int UNIQUE
@NonNull protected final java.lang.String name
@NonNull protected final DomainPackage evaluationPackage
protected final int flags
protected java.util.Map<java.lang.String,DomainOperation> operationMap
protected java.util.Map<java.lang.String,DomainProperty> propertyMap
public AbstractInheritance(@NonNull java.lang.String name, @NonNull DomainPackage evaluationPackage, int flags)
public static void initStatics()
public boolean conformsTo(@NonNull DomainStandardLibrary standardLibrary, @NonNull DomainType type)
DomainType
conformsTo
in interface DomainType
@NonNull public DomainInheritance getCommonInheritance(@NonNull DomainInheritance thatInheritance)
getCommonInheritance
in interface DomainInheritance
@NonNull public DomainType getCommonType(@NonNull IdResolver idResolver, @NonNull DomainType type)
DomainType
getCommonType
in interface DomainType
@Nullable public DomainFragment getFragment(@NonNull DomainInheritance thatInheritance)
getFragment
in interface DomainInheritance
@NonNull public DomainInheritance getInheritance(@NonNull DomainStandardLibrary standardLibrary)
DomainType
getInheritance
in interface DomainType
@Nullable public DomainOperation getMemberOperation(@NonNull OperationId operationId)
getMemberOperation
in interface DomainInheritance
public final java.lang.String getName()
DomainType
getName
in interface DomainType
getName
in interface Nameable
@NonNull public DomainType getNormalizedType(@NonNull DomainStandardLibrary standardLibrary)
DomainType
getNormalizedType
in interface DomainType
@NonNull protected DomainInheritance getOclAnyInheritance()
@NonNull public java.util.List<? extends DomainConstraint> getOwnedInvariant()
getOwnedInvariant
in interface DomainType
@NonNull public java.util.List<? extends DomainConstraint> getOwnedRule()
getOwnedRule
in interface DomainNamespace
@NonNull public final DomainPackage getPackage()
DomainType
getPackage
in interface DomainType
public boolean isEqualTo(@NonNull DomainStandardLibrary standardLibrary, @NonNull DomainType type)
DomainType
isEqualTo
in interface DomainType
public boolean isEqualToUnspecializedType(@NonNull DomainStandardLibrary standardLibrary, @NonNull DomainType type)
isEqualToUnspecializedType
in interface DomainType
public boolean isInvalid()
DomainType
isInvalid
in interface DomainType
public boolean isOrdered()
DomainType
isOrdered
in interface DomainType
public boolean isSubInheritanceOf(@NonNull DomainInheritance thatInheritance)
isSubInheritanceOf
in interface DomainInheritance
public boolean isSuperInheritanceOf(@NonNull DomainStandardLibrary standardLibrary, @NonNull DomainInheritance thatInheritance)
isSuperInheritanceOf
in interface DomainInheritance
public boolean isUndefined()
isUndefined
in interface DomainInheritance
public boolean isUnique()
DomainType
isUnique
in interface DomainType
@NonNull public LibraryFeature lookupImplementation(@NonNull DomainStandardLibrary standardLibrary, @NonNull DomainOperation staticOperation)
DomainType
lookupImplementation
in interface DomainType
@Nullable public DomainOperation lookupLocalOperation(@NonNull DomainStandardLibrary standardLibrary, @NonNull java.lang.String operationName, DomainInheritance... argumentTypes)
lookupLocalOperation
in interface DomainInheritance
public boolean oclEquals(@NonNull OCLValue thatValue)
OCLValue
Note that the caller must check that the argument is an OCLValue and should also check for the shortcut case that this == thatValue. Implementations are therefore wasting time if they re-implement the shortcut.
public int oclHashCode()
oclHashCode
in interface OCLValue
public DomainType specializeIn(@NonNull DomainCallExp expr, DomainType selfType)
specializeIn
in interface DomainType
public java.lang.String toString()
toString
in class java.lang.Object