protected Environment getGenericTypeEnvironment() { CoreClassifier genericCollectionType = (CoreClassifier)OclTypesDefinition.getType(getCollectionTypeName() + "<T>"); if (genericCollectionType != null) { return(genericCollectionType.getEnvironmentWithoutParents()); } else { return(null); } }
/* (non-Javadoc) * @see br.ufrj.cos.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier#getMostSpecificCommonSuperType(br.ufrj.cos.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier) */ public override CoreClassifier getMostSpecificCommonSuperType(CoreClassifier otherClassifier) { if (this.conformsTo(otherClassifier)) { return(otherClassifier); } else if (otherClassifier.conformsTo(this)) { return(this); } else { return((CoreClassifier)OclTypesDefinition.getType("OclAny")); } }
/* (non-Javadoc) * @see br.ufrj.cos.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier#getMostSpecificCommonSuperType(br.ufrj.cos.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier) */ public override CoreClassifier getMostSpecificCommonSuperType(CoreClassifier otherClassifier) { if (this.GetType() == otherClassifier.GetType()) { CollectionType otherCollection = (CollectionType)otherClassifier; return(createSpecificCollectionType(getElementType().getMostSpecificCommonSuperType(otherCollection.getElementType()))); } else if (otherClassifier is CollectionTypeImpl) { CollectionType otherCollection = (CollectionType)otherClassifier; return(createGenericCollectionType(getElementType().getMostSpecificCommonSuperType(otherCollection.getElementType()))); } else { return((CoreClassifier)OclTypesDefinition.getType("OclAny")); } }
public override Environment getEnvironmentWithoutParents() { return(OclTypesDefinition.getType("OclAny").getEnvironmentWithoutParents()); }