Exemplo n.º 1
0
        protected Environment getGenericTypeEnvironment()
        {
            CoreClassifier genericCollectionType = (CoreClassifier)OclTypesDefinition.getType(getCollectionTypeName() + "<T>");

            if (genericCollectionType != null)
            {
                return(genericCollectionType.getEnvironmentWithoutParents());
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
 /* (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"));
     }
 }
Exemplo n.º 3
0
 /* (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"));
     }
 }
Exemplo n.º 4
0
 public override Environment getEnvironmentWithoutParents()
 {
     return(OclTypesDefinition.getType("OclAny").getEnvironmentWithoutParents());
 }