Esempio n. 1
0
 public static Type findTypeOf(MetaModelManager metaModelManager, EClassifier eClass) {
   Resource resource = eClass.eResource();
   if (resource != null) {
     Ecore2Pivot adapter = Ecore2Pivot.findAdapter(resource, metaModelManager);
     if (adapter != null) {
       Type type = adapter.getCreated(Type.class, eClass);
       if (type != null) {
         return type;
       }
     }
   }
   return null;
 }
Esempio n. 2
0
 public static Type findTypeOf(
     @NonNull MetamodelManagerInternal metamodelManager, @NonNull EClassifier eClass) {
   Resource resource = eClass.eResource();
   if (resource != null) {
     External2AS adapter =
         Ecore2AS.findAdapter(resource, metamodelManager.getEnvironmentFactory());
     if (adapter != null) {
       Type type = adapter.getCreated(Type.class, eClass);
       if (type != null) {
         return type;
       }
     }
   }
   return null;
 }
 public @NonNull Type getType(@NonNull EClassifier eClassifier) {
   Ecore2AS ecore2as =
       Ecore2AS.getAdapter(ClassUtil.nonNullEMF(eClassifier.eResource()), environmentFactory);
   Type pivotType = ecore2as.getCreated(Type.class, eClassifier);
   return ClassUtil.nonNullState(pivotType);
 }