/**
  * Wraps an object in a {@link ModelObject}.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @param eClass the EClass of the object
  * @param adaptee the object being wrapped/adapted
  * @return the wrapper {@link ModelObject}
  * @generated
  */
 @SuppressWarnings({"unchecked", "rawtypes"})
 public <T> ModelObject<T> createModelObject(EClass eClass, T adaptee) {
   ModelObject<Object> modelObject = null;
   switch (eClass.getClassifierID()) {
     case SubstitutionzvonModelPackage.COMPLEXAAA_CLASSIFIER_ID:
       modelObject = new ComplexAAAModelObject();
       break;
     case SubstitutionzvonModelPackage.COMPLEXEVENTYPE_CLASSIFIER_ID:
       modelObject = new ComplexEvenTypeModelObject();
       break;
     case SubstitutionzvonModelPackage.COMPLEXODDTYPE_CLASSIFIER_ID:
       modelObject = new ComplexOddTypeModelObject();
       break;
     case SubstitutionzvonModelPackage.DOCUMENTROOT_CLASSIFIER_ID:
       modelObject = new DocumentRootModelObject();
       break;
     case SubstitutionzvonModelPackage.ROOTTYPE_CLASSIFIER_ID:
       modelObject = new RootTypeModelObject();
       break;
     default:
       throw new IllegalArgumentException(
           "The EClass '" + eClass + "' is not defined in this EPackage");
   }
   modelObject.setTarget(adaptee);
   return (ModelObject<T>) modelObject;
 }
Esempio n. 2
0
 /**
  * Wraps an object in a {@link ModelObject}.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @param eClass the EClass of the object
  * @param adaptee the object being wrapped/adapted
  * @return the wrapper {@link ModelObject}
  * @generated
  */
 @SuppressWarnings({"unchecked", "rawtypes"})
 public ModelObject createModelObject(EClass eClass, Object adaptee) {
   ModelObject<Object> modelObject = null;
   switch (eClass.getClassifierID()) {
     case ListModelPackage.STATESBYCOUNTRY_CLASSIFIER_ID:
       modelObject = new StatesByCountryModelObject();
       break;
     default:
       throw new IllegalArgumentException(
           "The EClass '" + eClass + "' is not defined in this EPackage");
   }
   modelObject.setTarget(adaptee);
   return modelObject;
 }