org.eclipse.emf.ecore.EGenericType Java Examples

The following examples show how to use org.eclipse.emf.ecore.EGenericType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EcoreGenericsUtil.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
public EGenericType getBoundGenericType(EGenericType genericType, EClass context) {
	ETypeParameter typeParameter = genericType.getETypeParameter();
	if (typeParameter != null) {
		// the reference type is a type parameter
		TypeBindingAcceptor typeBindingAcceptor = new TypeBindingAcceptor();
		addTypeParameterBindingsRecursively(context, typeBindingAcceptor);
		return typeBindingAcceptor.getBoundGenericType(typeParameter);
	} else {
		// the reference type is a generic type
		if (genericType.getEClassifier() == null) {
			throw new IllegalStateException("Either typeParameter or eRawType must be set in EGenericType "
					+ genericType);
		}
		return genericType;
	}
}
 
Example #2
Source File: EcoreGenericsUtil.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
protected static void addTypeParameterBindingsRecursively(EClass context, TypeBindingAcceptor bindingAcceptor) {
	for (EGenericType genericSuperType : context.getEGenericSuperTypes()) {
		EClassifier rawSuperType = genericSuperType.getEClassifier();
		EList<EGenericType> typeArguments = genericSuperType.getETypeArguments();
		EList<ETypeParameter> typeParameters = rawSuperType.getETypeParameters();
		if (typeArguments.size() != typeParameters.size()) {
			throw new IllegalStateException(
					"Number of typeArguments does not match number of typeParameters in EGenericType "
							+ genericSuperType);
		}
		for (int i = 0; i < typeArguments.size(); ++i) {
			bindingAcceptor.accept(typeParameters.get(i), typeArguments.get(i));
		}
		if (rawSuperType instanceof EClass) {
			addTypeParameterBindingsRecursively((EClass) rawSuperType, bindingAcceptor);
		}
	}
}
 
Example #3
Source File: EcoreGenericsUtil.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
public void accept(ETypeParameter typeParameter, EGenericType typeArgument) {
	if(bindings==null) {
		bindings = new HashMap<ETypeParameter, EGenericType>();
	}
	ETypeParameter replacedParameter = typeArgument.getETypeParameter();
	if (replacedParameter != null) {
		EGenericType existingBoundType = bindings.get(replacedParameter);
		if (existingBoundType != null) {
			bindings.remove(replacedParameter);
			bindings.put(typeParameter, existingBoundType);
			return;
		}
	} else {
		if (typeArgument.getEClassifier() == null) {
			throw new IllegalStateException("Either typeParameter or eClassifier must be set in ETypeArgument "
					+ typeArgument);
		}
	}
	bindings.put(typeParameter, typeArgument);
}
 
Example #4
Source File: EcoreGenericsUtil.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
public EClass getReferenceType(EReference reference, EClass context) {
	EGenericType genericType = reference.getEGenericType();
	if (genericType == null) {
		return reference.getEReferenceType();
	}
	EGenericType boundGenericType = getBoundGenericType(genericType, context);
	if (boundGenericType.getEClassifier() == null) {
		throw new IllegalStateException("Either typeParameter or eRawType must be set in EGenericType "
				+ genericType);
	}
	return (EClass) boundGenericType.getEClassifier();
}
 
Example #5
Source File: ExecutionPackageImpl.java    From kieker with Apache License 2.0 5 votes vote down vote up
/**
 * 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 -->
 * @generated
 */
public void initializePackageContents() {
	if (isInitialized) return;
	isInitialized = true;

	// Initialize package
	setName(eNAME);
	setNsPrefix(eNS_PREFIX);
	setNsURI(eNS_URI);

	// Obtain other dependent packages
	AnalysismodelPackage theAnalysismodelPackage = (AnalysismodelPackage)EPackage.Registry.INSTANCE.getEPackage(AnalysismodelPackage.eNS_URI);
	DeploymentPackage theDeploymentPackage = (DeploymentPackage)EPackage.Registry.INSTANCE.getEPackage(DeploymentPackage.eNS_URI);

	// Create type parameters

	// Set bounds for type parameters

	// Add supertypes to classes

	// Initialize classes, features, and operations; add parameters
	initEClass(executionModelEClass, ExecutionModel.class, "ExecutionModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEReference(getExecutionModel_AggregatedInvocations(), this.getDeployedOperationsPairToAggregatedInvocationMapEntry(), null, "aggregatedInvocations", null, 0, -1, ExecutionModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

	initEClass(deployedOperationsPairToAggregatedInvocationMapEntryEClass, Map.Entry.class, "DeployedOperationsPairToAggregatedInvocationMapEntry", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
	EGenericType g1 = createEGenericType(theAnalysismodelPackage.getComposedKey());
	EGenericType g2 = createEGenericType(theDeploymentPackage.getDeployedOperation());
	g1.getETypeArguments().add(g2);
	g2 = createEGenericType(theDeploymentPackage.getDeployedOperation());
	g1.getETypeArguments().add(g2);
	initEAttribute(getDeployedOperationsPairToAggregatedInvocationMapEntry_Key(), g1, "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
	initEReference(getDeployedOperationsPairToAggregatedInvocationMapEntry_Value(), this.getAggregatedInvocation(), null, "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(aggregatedInvocationEClass, AggregatedInvocation.class, "AggregatedInvocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEReference(getAggregatedInvocation_Source(), theDeploymentPackage.getDeployedOperation(), null, "source", null, 0, 1, AggregatedInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
	initEReference(getAggregatedInvocation_Target(), theDeploymentPackage.getDeployedOperation(), null, "target", null, 0, 1, AggregatedInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
}
 
Example #6
Source File: ExecComponentsPackageImpl.java    From neoscada with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * 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 -->
 * @generated
 */
public void initializePackageContents ()
{
    if ( isInitialized )
        return;
    isInitialized = true;

    // Initialize package
    setName ( eNAME );
    setNsPrefix ( eNS_PREFIX );
    setNsURI ( eNS_URI );

    // Obtain other dependent packages
    ComponentPackage theComponentPackage = (ComponentPackage)EPackage.Registry.INSTANCE.getEPackage ( ComponentPackage.eNS_URI );
    InfrastructurePackage theInfrastructurePackage = (InfrastructurePackage)EPackage.Registry.INSTANCE.getEPackage ( InfrastructurePackage.eNS_URI );
    SecurityPackage theSecurityPackage = (SecurityPackage)EPackage.Registry.INSTANCE.getEPackage ( SecurityPackage.eNS_URI );

    // Create type parameters

    // Set bounds for type parameters

    // Add supertypes to classes
    execJobEClass.getESuperTypes ().add ( theComponentPackage.getMasterComponent () );
    loadAverageEClass.getESuperTypes ().add ( this.getExecJob () );
    loadAverageConfigurationEClass.getESuperTypes ().add ( theComponentPackage.getConfiguration () );
    pingCheckEClass.getESuperTypes ().add ( this.getExecJob () );
    pingCheckConfigurationEClass.getESuperTypes ().add ( theComponentPackage.getConfiguration () );
    systemInformationVMStatEClass.getESuperTypes ().add ( this.getExecJob () );

    // Initialize classes, features, and operations; add parameters
    initEClass ( execJobEClass, ExecJob.class, "ExecJob", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$
    initEReference ( getExecJob_RunsOn (), theInfrastructurePackage.getDriver (), null, "runsOn", null, 1, 1, ExecJob.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$
    initEAttribute ( getExecJob_Name (), ecorePackage.getEString (), "name", null, 1, 1, ExecJob.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$

    EOperation op = initEOperation ( getExecJob__HasExecDriver__DiagnosticChain_Map (), ecorePackage.getEBoolean (), "hasExecDriver", 1, 1, IS_UNIQUE, IS_ORDERED ); //$NON-NLS-1$
    addEParameter ( op, ecorePackage.getEDiagnosticChain (), "diagnostics", 0, 1, IS_UNIQUE, IS_ORDERED ); //$NON-NLS-1$
    EGenericType g1 = createEGenericType ( ecorePackage.getEMap () );
    EGenericType g2 = createEGenericType ( ecorePackage.getEJavaObject () );
    g1.getETypeArguments ().add ( g2 );
    g2 = createEGenericType ( ecorePackage.getEJavaObject () );
    g1.getETypeArguments ().add ( g2 );
    addEParameter ( op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED ); //$NON-NLS-1$

    initEClass ( loadAverageEClass, LoadAverage.class, "LoadAverage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$

    initEClass ( loadAverageConfigurationEClass, LoadAverageConfiguration.class, "LoadAverageConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$
    initEAttribute ( getLoadAverageConfiguration_Period (), ecorePackage.getEInt (), "period", "1000", 1, 1, LoadAverageConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$ //$NON-NLS-2$
    initEAttribute ( getLoadAverageConfiguration_Pattern (), theSecurityPackage.getPattern (), "pattern", "([0-9]+) users?.*averages?: +([0-9]+[,\\\\.][0-9]*),? +([0-9]+[,\\\\.][0-9]*),? +([0-9]+[,\\\\.][0-9]*)", 1, 1, LoadAverageConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$ //$NON-NLS-2$

    initEClass ( pingCheckEClass, PingCheck.class, "PingCheck", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$
    initEReference ( getPingCheck_Node (), theInfrastructurePackage.getNode (), null, "node", null, 1, 1, PingCheck.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$

    initEClass ( pingCheckConfigurationEClass, PingCheckConfiguration.class, "PingCheckConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$
    initEAttribute ( getPingCheckConfiguration_PingDelay (), ecorePackage.getEIntegerObject (), "pingDelay", null, 0, 1, PingCheckConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$

    initEClass ( systemInformationVMStatEClass, SystemInformationVMStat.class, "SystemInformationVMStat", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$

    // Create resource
    createResource ( eNS_URI );
}
 
Example #7
Source File: EcoreGenericsUtil.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public EGenericType getBoundGenericType(ETypeParameter typeParameter) {
	if(bindings==null) 
		return null;
	return bindings.get(typeParameter);
}
 
Example #8
Source File: GenericTestPackageImpl.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
/**
 * 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 -->
 * @generated
 */
public void initializePackageContents() {
	if (isInitialized) return;
	isInitialized = true;

	// Initialize package
	setName(eNAME);
	setNsPrefix(eNS_PREFIX);
	setNsURI(eNS_URI);

	// Create type parameters
	ETypeParameter aEClass_T = addETypeParameter(aEClass, "T");
	ETypeParameter bEClass_U = addETypeParameter(bEClass, "U");
	ETypeParameter bEClass_V = addETypeParameter(bEClass, "V");
	ETypeParameter cEClass_W = addETypeParameter(cEClass, "W");

	// Set bounds for type parameters

	// Add supertypes to classes
	EGenericType g1 = createEGenericType(this.getA());
	EGenericType g2 = createEGenericType(bEClass_V);
	g1.getETypeArguments().add(g2);
	bEClass.getEGenericSuperTypes().add(g1);
	g1 = createEGenericType(this.getB());
	g2 = createEGenericType(cEClass_W);
	g1.getETypeArguments().add(g2);
	g2 = createEGenericType(this.getSomeType());
	g1.getETypeArguments().add(g2);
	cEClass.getEGenericSuperTypes().add(g1);
	g1 = createEGenericType(this.getC());
	g2 = createEGenericType(this.getOtherType());
	g1.getETypeArguments().add(g2);
	dEClass.getEGenericSuperTypes().add(g1);

	// Initialize classes and features; add operations and parameters
	initEClass(aEClass, org.eclipse.xtext.util.genericTest.A.class, "A", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	g1 = createEGenericType(aEClass_T);
	initEReference(getA_SomeReference(), g1, null, "someReference", null, 0, 1, org.eclipse.xtext.util.genericTest.A.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
	initEReference(getA_SomeReference1(), this.getSomeType(), null, "someReference1", null, 0, 1, org.eclipse.xtext.util.genericTest.A.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(bEClass, org.eclipse.xtext.util.genericTest.B.class, "B", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	g1 = createEGenericType(bEClass_U);
	initEReference(getB_OtherReference(), g1, null, "otherReference", null, 0, 1, org.eclipse.xtext.util.genericTest.B.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
	g1 = createEGenericType(this.getA());
	g2 = createEGenericType(this.getOtherType());
	g1.getETypeArguments().add(g2);
	initEReference(getB_OtherReference1(), g1, null, "otherReference1", null, 0, 1, org.eclipse.xtext.util.genericTest.B.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(cEClass, org.eclipse.xtext.util.genericTest.C.class, "C", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

	initEClass(dEClass, org.eclipse.xtext.util.genericTest.D.class, "D", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

	initEClass(someTypeEClass, SomeType.class, "SomeType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

	initEClass(otherTypeEClass, OtherType.class, "OtherType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

	// Create resource
	createResource(eNS_URI);
}
 
Example #9
Source File: StatisticsPackageImpl.java    From kieker with Apache License 2.0 4 votes vote down vote up
/**
 * 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 -->
 * @generated
 */
public void initializePackageContents() {
	if (isInitialized) return;
	isInitialized = true;

	// Initialize package
	setName(eNAME);
	setNsPrefix(eNS_PREFIX);
	setNsURI(eNS_URI);

	// Obtain other dependent packages
	AnalysismodelPackage theAnalysismodelPackage = (AnalysismodelPackage)EPackage.Registry.INSTANCE.getEPackage(AnalysismodelPackage.eNS_URI);

	// Create type parameters
	ETypeParameter timeSeriesEClass_V = addETypeParameter(timeSeriesEClass, "V");
	ETypeParameter timeSeriesEClass_U = addETypeParameter(timeSeriesEClass, "U");
	ETypeParameter unitEClass_V = addETypeParameter(unitEClass, "V");

	// Set bounds for type parameters
	EGenericType g1 = createEGenericType(this.getValue());
	timeSeriesEClass_V.getEBounds().add(g1);
	g1 = createEGenericType(this.getUnit());
	EGenericType g2 = createEGenericType(timeSeriesEClass_V);
	g1.getETypeArguments().add(g2);
	timeSeriesEClass_U.getEBounds().add(g1);
	g1 = createEGenericType(this.getValue());
	unitEClass_V.getEBounds().add(g1);

	// Add supertypes to classes
	intValueEClass.getESuperTypes().add(this.getValue());
	longValueEClass.getESuperTypes().add(this.getValue());
	floatValueEClass.getESuperTypes().add(this.getValue());
	doubleValueEClass.getESuperTypes().add(this.getValue());

	// Initialize classes, features, and operations; add parameters
	initEClass(statisticsEClass, Statistics.class, "Statistics", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	g1 = createEGenericType(this.getTimeSeries());
	g2 = createEGenericType();
	g1.getETypeArguments().add(g2);
	g2 = createEGenericType();
	g1.getETypeArguments().add(g2);
	initEReference(getStatistics_TimeSeries(), g1, null, "timeSeries", null, 0, -1, Statistics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(timeSeriesEClass, TimeSeries.class, "TimeSeries", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEAttribute(getTimeSeries_Name(), ecorePackage.getEString(), "name", null, 0, 1, TimeSeries.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
	initEAttribute(getTimeSeries_Unit(), ecorePackage.getEJavaObject(), "unit", null, 0, 1, TimeSeries.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
	g1 = createEGenericType(timeSeriesEClass_V);
	initEReference(getTimeSeries_Values(), g1, null, "values", null, 0, -1, TimeSeries.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(valueEClass, Value.class, "Value", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEAttribute(getValue_Timestamp(), theAnalysismodelPackage.getInstant(), "timestamp", null, 0, 1, Value.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(intValueEClass, IntValue.class, "IntValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEAttribute(getIntValue_Measurement(), ecorePackage.getEInt(), "measurement", null, 0, 1, IntValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(longValueEClass, LongValue.class, "LongValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEAttribute(getLongValue_Measurement(), ecorePackage.getELong(), "measurement", null, 0, 1, LongValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(floatValueEClass, FloatValue.class, "FloatValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEAttribute(getFloatValue_Measurement(), ecorePackage.getEFloat(), "measurement", null, 0, 1, FloatValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(doubleValueEClass, DoubleValue.class, "DoubleValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	initEAttribute(getDoubleValue_Measurement(), ecorePackage.getEDouble(), "measurement", null, 0, 1, DoubleValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

	initEClass(unitEClass, Unit.class, "Unit", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

	// Initialize enums and add enum literals
	initEEnum(predefinedUnitsEEnum, PredefinedUnits.class, "PredefinedUnits");
	addEEnumLiteral(predefinedUnitsEEnum, PredefinedUnits.CPU_UTIL);
	addEEnumLiteral(predefinedUnitsEEnum, PredefinedUnits.RESPONSE_TIME);
}