|
@@ -6,97 +6,102 @@
|
|
|
*/
|
|
*/
|
|
|
package org.yakindu.base.types.impl;
|
|
package org.yakindu.base.types.impl;
|
|
|
|
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
|
|
+import java.net.URL;
|
|
|
|
|
+
|
|
|
|
|
+import org.eclipse.emf.common.util.URI;
|
|
|
|
|
+import org.eclipse.emf.common.util.WrappedException;
|
|
|
import org.eclipse.emf.ecore.EAttribute;
|
|
import org.eclipse.emf.ecore.EAttribute;
|
|
|
import org.eclipse.emf.ecore.EClass;
|
|
import org.eclipse.emf.ecore.EClass;
|
|
|
|
|
+import org.eclipse.emf.ecore.EClassifier;
|
|
|
import org.eclipse.emf.ecore.EPackage;
|
|
import org.eclipse.emf.ecore.EPackage;
|
|
|
import org.eclipse.emf.ecore.EReference;
|
|
import org.eclipse.emf.ecore.EReference;
|
|
|
-
|
|
|
|
|
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
|
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
|
|
-
|
|
|
|
|
-import org.yakindu.base.types.Feature;
|
|
|
|
|
-import org.yakindu.base.types.Library;
|
|
|
|
|
-import org.yakindu.base.types.NamedElement;
|
|
|
|
|
-import org.yakindu.base.types.Operation;
|
|
|
|
|
-import org.yakindu.base.types.Parameter;
|
|
|
|
|
-import org.yakindu.base.types.Property;
|
|
|
|
|
-import org.yakindu.base.types.Type;
|
|
|
|
|
-import org.yakindu.base.types.TypedElement;
|
|
|
|
|
|
|
+import org.eclipse.emf.ecore.resource.Resource;
|
|
|
|
|
+import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
|
|
|
import org.yakindu.base.types.TypesFactory;
|
|
import org.yakindu.base.types.TypesFactory;
|
|
|
import org.yakindu.base.types.TypesPackage;
|
|
import org.yakindu.base.types.TypesPackage;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * An implementation of the model <b>Package</b>.
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
|
|
|
|
|
+ * end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
|
|
public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
|
|
+ * @generated
|
|
|
|
|
+ */
|
|
|
|
|
+ protected String packageFilename = "types.ecore";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass typeEClass = null;
|
|
private EClass typeEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass featureEClass = null;
|
|
private EClass featureEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass operationEClass = null;
|
|
private EClass operationEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass propertyEClass = null;
|
|
private EClass propertyEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass parameterEClass = null;
|
|
private EClass parameterEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass typedElementEClass = null;
|
|
private EClass typedElementEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass namedElementEClass = null;
|
|
private EClass namedElementEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private EClass libraryEClass = null;
|
|
private EClass libraryEClass = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Creates an instance of the model <b>Package</b>, registered with
|
|
* Creates an instance of the model <b>Package</b>, registered with
|
|
|
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
|
|
|
|
- * package URI value.
|
|
|
|
|
- * <p>Note: the correct way to create the package is via the static
|
|
|
|
|
- * factory method {@link #init init()}, which also performs
|
|
|
|
|
- * initialization of the package, or returns the registered package,
|
|
|
|
|
- * if one already exists.
|
|
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
|
|
|
|
|
+ * package package URI value.
|
|
|
|
|
+ * <p>
|
|
|
|
|
+ * Note: the correct way to create the package is via the static factory
|
|
|
|
|
+ * method {@link #init init()}, which also performs initialization of the
|
|
|
|
|
+ * package, or returns the registered package, if one already exists. <!--
|
|
|
|
|
+ * begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @see org.eclipse.emf.ecore.EPackage.Registry
|
|
* @see org.eclipse.emf.ecore.EPackage.Registry
|
|
|
* @see org.yakindu.base.types.TypesPackage#eNS_URI
|
|
* @see org.yakindu.base.types.TypesPackage#eNS_URI
|
|
|
* @see #init()
|
|
* @see #init()
|
|
@@ -107,329 +112,322 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
private static boolean isInited = false;
|
|
private static boolean isInited = false;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
|
|
|
|
|
|
|
+ * Creates, registers, and initializes the <b>Package</b> for this model,
|
|
|
|
|
+ * and for any others upon which it depends.
|
|
|
|
|
+ *
|
|
|
|
|
+ * <p>
|
|
|
|
|
+ * This method is used to initialize {@link TypesPackage#eINSTANCE} when
|
|
|
|
|
+ * that field is accessed. Clients should not invoke it directly. Instead,
|
|
|
|
|
+ * they should simply access that field to obtain the package. <!--
|
|
|
|
|
+ * begin-user-doc --> <!-- end-user-doc -->
|
|
|
*
|
|
*
|
|
|
- * <p>This method is used to initialize {@link TypesPackage#eINSTANCE} when that field is accessed.
|
|
|
|
|
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
|
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
* @see #eNS_URI
|
|
* @see #eNS_URI
|
|
|
- * @see #createPackageContents()
|
|
|
|
|
- * @see #initializePackageContents()
|
|
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public static TypesPackage init() {
|
|
public static TypesPackage init() {
|
|
|
- if (isInited) return (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
|
|
|
|
|
|
|
+ if (isInited)
|
|
|
|
|
+ return (TypesPackage) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI);
|
|
|
|
|
|
|
|
// Obtain or create and register package
|
|
// Obtain or create and register package
|
|
|
- TypesPackageImpl theTypesPackage = (TypesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TypesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TypesPackageImpl());
|
|
|
|
|
|
|
+ TypesPackageImpl theTypesPackage = (TypesPackageImpl) (EPackage.Registry.INSTANCE
|
|
|
|
|
+ .get(eNS_URI) instanceof TypesPackageImpl ? EPackage.Registry.INSTANCE
|
|
|
|
|
+ .get(eNS_URI) : new TypesPackageImpl());
|
|
|
|
|
|
|
|
isInited = true;
|
|
isInited = true;
|
|
|
|
|
|
|
|
- // Create package meta-data objects
|
|
|
|
|
- theTypesPackage.createPackageContents();
|
|
|
|
|
|
|
+ // Load packages
|
|
|
|
|
+ theTypesPackage.loadPackage();
|
|
|
|
|
|
|
|
- // Initialize created meta-data
|
|
|
|
|
- theTypesPackage.initializePackageContents();
|
|
|
|
|
|
|
+ // Fix loaded packages
|
|
|
|
|
+ theTypesPackage.fixPackageContents();
|
|
|
|
|
|
|
|
// Mark meta-data to indicate it can't be changed
|
|
// Mark meta-data to indicate it can't be changed
|
|
|
theTypesPackage.freeze();
|
|
theTypesPackage.freeze();
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// Update the registry and return the package
|
|
// Update the registry and return the package
|
|
|
EPackage.Registry.INSTANCE.put(TypesPackage.eNS_URI, theTypesPackage);
|
|
EPackage.Registry.INSTANCE.put(TypesPackage.eNS_URI, theTypesPackage);
|
|
|
return theTypesPackage;
|
|
return theTypesPackage;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getType() {
|
|
public EClass getType() {
|
|
|
|
|
+ if (typeEClass == null) {
|
|
|
|
|
+ typeEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(0);
|
|
|
|
|
+ }
|
|
|
return typeEClass;
|
|
return typeEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getType_Features() {
|
|
public EReference getType_Features() {
|
|
|
- return (EReference)typeEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EReference) getType().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getType_SuperTypes() {
|
|
public EReference getType_SuperTypes() {
|
|
|
- return (EReference)typeEClass.getEStructuralFeatures().get(1);
|
|
|
|
|
|
|
+ return (EReference) getType().getEStructuralFeatures().get(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getType_OwningLibrary() {
|
|
public EReference getType_OwningLibrary() {
|
|
|
- return (EReference)typeEClass.getEStructuralFeatures().get(2);
|
|
|
|
|
|
|
+ return (EReference) getType().getEStructuralFeatures().get(2);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getFeature() {
|
|
public EClass getFeature() {
|
|
|
|
|
+ if (featureEClass == null) {
|
|
|
|
|
+ featureEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(1);
|
|
|
|
|
+ }
|
|
|
return featureEClass;
|
|
return featureEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getFeature_OwningType() {
|
|
public EReference getFeature_OwningType() {
|
|
|
- return (EReference)featureEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EReference) getFeature().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getOperation() {
|
|
public EClass getOperation() {
|
|
|
|
|
+ if (operationEClass == null) {
|
|
|
|
|
+ operationEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(2);
|
|
|
|
|
+ }
|
|
|
return operationEClass;
|
|
return operationEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getOperation_Parameters() {
|
|
public EReference getOperation_Parameters() {
|
|
|
- return (EReference)operationEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EReference) getOperation().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getProperty() {
|
|
public EClass getProperty() {
|
|
|
|
|
+ if (propertyEClass == null) {
|
|
|
|
|
+ propertyEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(3);
|
|
|
|
|
+ }
|
|
|
return propertyEClass;
|
|
return propertyEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getParameter() {
|
|
public EClass getParameter() {
|
|
|
|
|
+ if (parameterEClass == null) {
|
|
|
|
|
+ parameterEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(4);
|
|
|
|
|
+ }
|
|
|
return parameterEClass;
|
|
return parameterEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getParameter_OwningOperation() {
|
|
public EReference getParameter_OwningOperation() {
|
|
|
- return (EReference)parameterEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EReference) getParameter().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getTypedElement() {
|
|
public EClass getTypedElement() {
|
|
|
|
|
+ if (typedElementEClass == null) {
|
|
|
|
|
+ typedElementEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(5);
|
|
|
|
|
+ }
|
|
|
return typedElementEClass;
|
|
return typedElementEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getTypedElement_Type() {
|
|
public EReference getTypedElement_Type() {
|
|
|
- return (EReference)typedElementEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EReference) getTypedElement().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getNamedElement() {
|
|
public EClass getNamedElement() {
|
|
|
|
|
+ if (namedElementEClass == null) {
|
|
|
|
|
+ namedElementEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(6);
|
|
|
|
|
+ }
|
|
|
return namedElementEClass;
|
|
return namedElementEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EAttribute getNamedElement_Name() {
|
|
public EAttribute getNamedElement_Name() {
|
|
|
- return (EAttribute)namedElementEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EAttribute) getNamedElement().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EClass getLibrary() {
|
|
public EClass getLibrary() {
|
|
|
|
|
+ if (libraryEClass == null) {
|
|
|
|
|
+ libraryEClass = (EClass) EPackage.Registry.INSTANCE
|
|
|
|
|
+ .getEPackage(TypesPackage.eNS_URI).getEClassifiers().get(7);
|
|
|
|
|
+ }
|
|
|
return libraryEClass;
|
|
return libraryEClass;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EReference getLibrary_Types() {
|
|
public EReference getLibrary_Types() {
|
|
|
- return (EReference)libraryEClass.getEStructuralFeatures().get(0);
|
|
|
|
|
|
|
+ return (EReference) getLibrary().getEStructuralFeatures().get(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public EAttribute getLibrary_Id() {
|
|
public EAttribute getLibrary_Id() {
|
|
|
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(1);
|
|
|
|
|
|
|
+ return (EAttribute) getLibrary().getEStructuralFeatures().get(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
public TypesFactory getTypesFactory() {
|
|
public TypesFactory getTypesFactory() {
|
|
|
- return (TypesFactory)getEFactoryInstance();
|
|
|
|
|
|
|
+ return (TypesFactory) getEFactoryInstance();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
- private boolean isCreated = false;
|
|
|
|
|
|
|
+ private boolean isLoaded = false;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Creates the meta-model objects for the package. This method is
|
|
|
|
|
- * guarded to have no affect on any invocation but its first.
|
|
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * Laods the package and any sub-packages from their serialized form. <!--
|
|
|
|
|
+ * begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
- public void createPackageContents() {
|
|
|
|
|
- if (isCreated) return;
|
|
|
|
|
- isCreated = true;
|
|
|
|
|
-
|
|
|
|
|
- // Create classes and their features
|
|
|
|
|
- typeEClass = createEClass(TYPE);
|
|
|
|
|
- createEReference(typeEClass, TYPE__FEATURES);
|
|
|
|
|
- createEReference(typeEClass, TYPE__SUPER_TYPES);
|
|
|
|
|
- createEReference(typeEClass, TYPE__OWNING_LIBRARY);
|
|
|
|
|
-
|
|
|
|
|
- featureEClass = createEClass(FEATURE);
|
|
|
|
|
- createEReference(featureEClass, FEATURE__OWNING_TYPE);
|
|
|
|
|
-
|
|
|
|
|
- operationEClass = createEClass(OPERATION);
|
|
|
|
|
- createEReference(operationEClass, OPERATION__PARAMETERS);
|
|
|
|
|
-
|
|
|
|
|
- propertyEClass = createEClass(PROPERTY);
|
|
|
|
|
-
|
|
|
|
|
- parameterEClass = createEClass(PARAMETER);
|
|
|
|
|
- createEReference(parameterEClass, PARAMETER__OWNING_OPERATION);
|
|
|
|
|
-
|
|
|
|
|
- typedElementEClass = createEClass(TYPED_ELEMENT);
|
|
|
|
|
- createEReference(typedElementEClass, TYPED_ELEMENT__TYPE);
|
|
|
|
|
-
|
|
|
|
|
- namedElementEClass = createEClass(NAMED_ELEMENT);
|
|
|
|
|
- createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);
|
|
|
|
|
-
|
|
|
|
|
- libraryEClass = createEClass(LIBRARY);
|
|
|
|
|
- createEReference(libraryEClass, LIBRARY__TYPES);
|
|
|
|
|
- createEAttribute(libraryEClass, LIBRARY__ID);
|
|
|
|
|
|
|
+ public void loadPackage() {
|
|
|
|
|
+ if (isLoaded)
|
|
|
|
|
+ return;
|
|
|
|
|
+ isLoaded = true;
|
|
|
|
|
+
|
|
|
|
|
+ URL url = getClass().getResource(packageFilename);
|
|
|
|
|
+ if (url == null) {
|
|
|
|
|
+ throw new RuntimeException("Missing serialized package: "
|
|
|
|
|
+ + packageFilename);
|
|
|
|
|
+ }
|
|
|
|
|
+ URI uri = URI.createURI(url.toString());
|
|
|
|
|
+ Resource resource = new EcoreResourceFactoryImpl().createResource(uri);
|
|
|
|
|
+ try {
|
|
|
|
|
+ resource.load(null);
|
|
|
|
|
+ } catch (IOException exception) {
|
|
|
|
|
+ throw new WrappedException(exception);
|
|
|
|
|
+ }
|
|
|
|
|
+ initializeFromLoadedEPackage(this, (EPackage) resource.getContents()
|
|
|
|
|
+ .get(0));
|
|
|
|
|
+ createResource(eNS_URI);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
- private boolean isInitialized = false;
|
|
|
|
|
|
|
+ private boolean isFixed = false;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Complete the initialization of the package and its meta-model. This
|
|
|
|
|
- * method is guarded to have no affect on any invocation but its first.
|
|
|
|
|
- * <!-- begin-user-doc -->
|
|
|
|
|
- * <!-- end-user-doc -->
|
|
|
|
|
|
|
+ * Fixes up the loaded package, to make it appear as if it had been
|
|
|
|
|
+ * programmatically built. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
* @generated
|
|
* @generated
|
|
|
*/
|
|
*/
|
|
|
- public void initializePackageContents() {
|
|
|
|
|
- if (isInitialized) return;
|
|
|
|
|
- isInitialized = true;
|
|
|
|
|
-
|
|
|
|
|
- // Initialize package
|
|
|
|
|
- setName(eNAME);
|
|
|
|
|
- setNsPrefix(eNS_PREFIX);
|
|
|
|
|
- setNsURI(eNS_URI);
|
|
|
|
|
-
|
|
|
|
|
- // Create type parameters
|
|
|
|
|
-
|
|
|
|
|
- // Set bounds for type parameters
|
|
|
|
|
-
|
|
|
|
|
- // Add supertypes to classes
|
|
|
|
|
- typeEClass.getESuperTypes().add(this.getNamedElement());
|
|
|
|
|
- featureEClass.getESuperTypes().add(this.getTypedElement());
|
|
|
|
|
- featureEClass.getESuperTypes().add(this.getNamedElement());
|
|
|
|
|
- operationEClass.getESuperTypes().add(this.getFeature());
|
|
|
|
|
- propertyEClass.getESuperTypes().add(this.getFeature());
|
|
|
|
|
- parameterEClass.getESuperTypes().add(this.getTypedElement());
|
|
|
|
|
- parameterEClass.getESuperTypes().add(this.getNamedElement());
|
|
|
|
|
-
|
|
|
|
|
- // Initialize classes and features; add operations and parameters
|
|
|
|
|
- initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEReference(getType_Features(), this.getFeature(), this.getFeature_OwningType(), "features", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
- initEReference(getType_SuperTypes(), this.getType(), null, "superTypes", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
- initEReference(getType_OwningLibrary(), this.getLibrary(), this.getLibrary_Types(), "owningLibrary", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(featureEClass, Feature.class, "Feature", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEReference(getFeature_OwningType(), this.getType(), this.getType_Features(), "owningType", null, 0, 1, Feature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(operationEClass, Operation.class, "Operation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEReference(getOperation_Parameters(), this.getParameter(), this.getParameter_OwningOperation(), "parameters", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEReference(getParameter_OwningOperation(), this.getOperation(), this.getOperation_Parameters(), "owningOperation", null, 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(typedElementEClass, TypedElement.class, "TypedElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEReference(getTypedElement_Type(), this.getType(), null, "type", null, 1, 1, TypedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(namedElementEClass, NamedElement.class, "NamedElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
-
|
|
|
|
|
- initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
|
|
|
- initEReference(getLibrary_Types(), this.getType(), this.getType_OwningLibrary(), "types", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
- initEAttribute(getLibrary_Id(), ecorePackage.getEString(), "id", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
|
|
|
+ public void fixPackageContents() {
|
|
|
|
|
+ if (isFixed)
|
|
|
|
|
+ return;
|
|
|
|
|
+ isFixed = true;
|
|
|
|
|
+ fixEClassifiers();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // Create resource
|
|
|
|
|
- createResource(eNS_URI);
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Sets the instance class on the given classifier. <!-- begin-user-doc -->
|
|
|
|
|
+ * <!-- end-user-doc -->
|
|
|
|
|
+ *
|
|
|
|
|
+ * @generated
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ protected void fixInstanceClass(EClassifier eClassifier) {
|
|
|
|
|
+ if (eClassifier.getInstanceClassName() == null) {
|
|
|
|
|
+ eClassifier.setInstanceClassName("org.yakindu.base.types."
|
|
|
|
|
+ + eClassifier.getName());
|
|
|
|
|
+ setGeneratedClassName(eClassifier);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-} //TypesPackageImpl
|
|
|
|
|
|
|
+} // TypesPackageImpl
|