/**
* Copyright (c) 2011-2018 EclipseSource Muenchen GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* EclipseSource Muenchen GmbH - initial API and implementation
*/
package org.eclipse.emf.ecp.edit.internal.model.testData.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.emf.ecp.edit.internal.model.testData.TestData;
import org.eclipse.emf.ecp.edit.internal.model.testData.TestDataFactory;
import org.eclipse.emf.ecp.edit.internal.model.testData.TestDataPackage;
import org.eclipse.emf.ecp.edit.internal.model.testData.util.TestDataValidator;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
*
* @generated
*/
public class TestDataPackageImpl extends EPackageImpl implements TestDataPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
private EClass testDataEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
private EDataType stringWithMaxLength8EDataType = null;
/**
* 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 -->
*
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.emf.ecp.edit.internal.model.testData.TestDataPackage#eNS_URI
* @see #init()
* @generated
*/
private TestDataPackageImpl() {
super(eNS_URI, TestDataFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
private static boolean isInited = false;
/**
* 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 TestDataPackage#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 #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static TestDataPackage init() {
if (isInited) {
return (TestDataPackage) EPackage.Registry.INSTANCE.getEPackage(TestDataPackage.eNS_URI);
}
// Obtain or create and register package
final TestDataPackageImpl theTestDataPackage = (TestDataPackageImpl) (EPackage.Registry.INSTANCE
.get(eNS_URI) instanceof TestDataPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
: new TestDataPackageImpl());
isInited = true;
// Create package meta-data objects
theTestDataPackage.createPackageContents();
// Initialize created meta-data
theTestDataPackage.initializePackageContents();
// Register package validator
EValidator.Registry.INSTANCE.put(theTestDataPackage,
new EValidator.Descriptor() {
public EValidator getEValidator() {
return TestDataValidator.INSTANCE;
}
});
// Mark meta-data to indicate it can't be changed
theTestDataPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(TestDataPackage.eNS_URI, theTestDataPackage);
return theTestDataPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public EClass getTestData() {
return testDataEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public EAttribute getTestData_String() {
return (EAttribute) testDataEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public EAttribute getTestData_Boolean() {