/*
 * generated by Xtext
 */
package org.eclipse.emf.ecore.xcore.serializer;

import com.google.inject.Inject;
import java.util.Map;
import java.util.Set;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.xcore.XAnnotation;
import org.eclipse.emf.ecore.xcore.XAnnotationDirective;
import org.eclipse.emf.ecore.xcore.XAttribute;
import org.eclipse.emf.ecore.xcore.XClass;
import org.eclipse.emf.ecore.xcore.XDataType;
import org.eclipse.emf.ecore.xcore.XEnum;
import org.eclipse.emf.ecore.xcore.XEnumLiteral;
import org.eclipse.emf.ecore.xcore.XGenericType;
import org.eclipse.emf.ecore.xcore.XImportDirective;
import org.eclipse.emf.ecore.xcore.XOperation;
import org.eclipse.emf.ecore.xcore.XPackage;
import org.eclipse.emf.ecore.xcore.XParameter;
import org.eclipse.emf.ecore.xcore.XReference;
import org.eclipse.emf.ecore.xcore.XTypeParameter;
import org.eclipse.emf.ecore.xcore.XcorePackage;
import org.eclipse.emf.ecore.xcore.services.XcoreGrammarAccess;
import org.eclipse.xtext.Action;
import org.eclipse.xtext.Parameter;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.common.types.JvmFormalParameter;
import org.eclipse.xtext.common.types.JvmGenericArrayTypeReference;
import org.eclipse.xtext.common.types.JvmInnerTypeReference;
import org.eclipse.xtext.common.types.JvmLowerBound;
import org.eclipse.xtext.common.types.JvmParameterizedTypeReference;
import org.eclipse.xtext.common.types.JvmTypeParameter;
import org.eclipse.xtext.common.types.JvmUpperBound;
import org.eclipse.xtext.common.types.JvmWildcardTypeReference;
import org.eclipse.xtext.common.types.TypesPackage;
import org.eclipse.xtext.serializer.ISerializationContext;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
import org.eclipse.xtext.xbase.XAssignment;
import org.eclipse.xtext.xbase.XBasicForLoopExpression;
import org.eclipse.xtext.xbase.XBinaryOperation;
import org.eclipse.xtext.xbase.XBlockExpression;
import org.eclipse.xtext.xbase.XBooleanLiteral;
import org.eclipse.xtext.xbase.XCasePart;
import org.eclipse.xtext.xbase.XCastedExpression;
import org.eclipse.xtext.xbase.XCatchClause;
import org.eclipse.xtext.xbase.XClosure;
import org.eclipse.xtext.xbase.XConstructorCall;
import org.eclipse.xtext.xbase.XDoWhileExpression;
import org.eclipse.xtext.xbase.XFeatureCall;
import org.eclipse.xtext.xbase.XForLoopExpression;
import org.eclipse.xtext.xbase.XIfExpression;
import org.eclipse.xtext.xbase.XInstanceOfExpression;
import org.eclipse.xtext.xbase.XListLiteral;
import org.eclipse.xtext.xbase.XMemberFeatureCall;
import org.eclipse.xtext.xbase.XNullLiteral;
import org.eclipse.xtext.xbase.XNumberLiteral;
import org.eclipse.xtext.xbase.XPostfixOperation;
import org.eclipse.xtext.xbase.XReturnExpression;
import org.eclipse.xtext.xbase.XSetLiteral;
import org.eclipse.xtext.xbase.XStringLiteral;
import org.eclipse.xtext.xbase.XSwitchExpression;
import org.eclipse.xtext.xbase.XSynchronizedExpression;
import org.eclipse.xtext.xbase.XThrowExpression;
import org.eclipse.xtext.xbase.XTryCatchFinallyExpression;
import org.eclipse.xtext.xbase.XTypeLiteral;
import org.eclipse.xtext.xbase.XUnaryOperation;
import org.eclipse.xtext.xbase.XVariableDeclaration;
import org.eclipse.xtext.xbase.XWhileExpression;
import org.eclipse.xtext.xbase.XbasePackage;
import org.eclipse.xtext.xbase.serializer.XbaseSemanticSequencer;
import org.eclipse.xtext.xtype.XFunctionTypeRef;
import org.eclipse.xtext.xtype.XImportDeclaration;
import org.eclipse.xtext.xtype.XImportSection;
import org.eclipse.xtext.xtype.XtypePackage;

@SuppressWarnings("all")
public class XcoreSemanticSequencer extends XbaseSemanticSequencer {

	@Inject
	private XcoreGrammarAccess grammarAccess;
	
	@Override
	public void sequence(ISerializationContext context, EObject semanticObject) {
		EPackage epackage = semanticObject.eClass().getEPackage();
		ParserRule rule = context.getParserRule();
		Action action = context.getAssignedAction();
		Set<Parameter> parameters = context.getEnabledBooleanParameters();
		if (epackage == TypesPackage.eINSTANCE)
			switch (semanticObject.eClass().getClassifierID()) {
			case TypesPackage.JVM_FORMAL_PARAMETER:
				if (rule == grammarAccess.getFullJvmFormalParameterRule()) {
					sequence_FullJvmFormalParameter(context, (JvmFormalParameter) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getJvmFormalParameterRule()) {
					sequence_JvmFormalParameter(context, (JvmFormalParameter) semanticObject); 
					return; 
				}
				else break;
			case TypesPackage.JVM_GENERIC_ARRAY_TYPE_REFERENCE:
				sequence_JvmTypeReference(context, (JvmGenericArrayTypeReference) semanticObject); 
				return; 
			case TypesPackage.JVM_INNER_TYPE_REFERENCE:
				sequence_JvmParameterizedTypeReference(context, (JvmInnerTypeReference) semanticObject); 
				return; 
			case TypesPackage.JVM_LOWER_BOUND:
				if (rule == grammarAccess.getJvmLowerBoundAndedRule()) {
					sequence_JvmLowerBoundAnded(context, (JvmLowerBound) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getJvmLowerBoundRule()) {
					sequence_JvmLowerBound(context, (JvmLowerBound) semanticObject); 
					return; 
				}
				else break;
			case TypesPackage.JVM_PARAMETERIZED_TYPE_REFERENCE:
				if (action == grammarAccess.getJvmParameterizedTypeReferenceAccess().getJvmInnerTypeReferenceOuterAction_1_4_0_0_0()) {
					sequence_JvmParameterizedTypeReference_JvmInnerTypeReference_1_4_0_0_0(context, (JvmParameterizedTypeReference) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getJvmTypeReferenceRule()
						|| action == grammarAccess.getJvmTypeReferenceAccess().getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0()
						|| rule == grammarAccess.getJvmParameterizedTypeReferenceRule()
						|| rule == grammarAccess.getJvmArgumentTypeReferenceRule()) {
					sequence_JvmParameterizedTypeReference(context, (JvmParameterizedTypeReference) semanticObject); 
					return; 
				}
				else break;
			case TypesPackage.JVM_TYPE_PARAMETER:
				sequence_JvmTypeParameter(context, (JvmTypeParameter) semanticObject); 
				return; 
			case TypesPackage.JVM_UPPER_BOUND:
				if (rule == grammarAccess.getJvmUpperBoundAndedRule()) {
					sequence_JvmUpperBoundAnded(context, (JvmUpperBound) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getJvmUpperBoundRule()) {
					sequence_JvmUpperBound(context, (JvmUpperBound) semanticObject); 
					return; 
				}
				else break;
			case TypesPackage.JVM_WILDCARD_TYPE_REFERENCE:
				sequence_JvmWildcardTypeReference(context, (JvmWildcardTypeReference) semanticObject); 
				return; 
			}
		else if (epackage == XbasePackage.eINSTANCE)
			switch (semanticObject.eClass().getClassifierID()) {
			case XbasePackage.XASSIGNMENT:
				sequence_XAssignment_XMemberFeatureCall(context, (XAssignment) semanticObject); 
				return; 
			case XbasePackage.XBASIC_FOR_LOOP_EXPRESSION:
				sequence_XBasicForLoopExpression(context, (XBasicForLoopExpression) semanticObject); 
				return; 
			case XbasePackage.XBINARY_OPERATION:
				sequence_XAdditiveExpression_XAndExpression_XAssignment_XEqualityExpression_XMultiplicativeExpression_XOrExpression_XOtherOperatorExpression_XRelationalExpression(context, (XBinaryOperation) semanticObject); 
				return; 
			case XbasePackage.XBLOCK_EXPRESSION:
				if (rule == grammarAccess.getXBlockExpressionRule()
						|| rule == grammarAccess.getXExpressionRule()
						|| rule == grammarAccess.getXAssignmentRule()
						|| action == grammarAccess.getXAssignmentAccess().getXBinaryOperationLeftOperandAction_1_1_0_0_0()
						|| rule == grammarAccess.getXOrExpressionRule()
						|| action == grammarAccess.getXOrExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXAndExpressionRule()
						|| action == grammarAccess.getXAndExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXEqualityExpressionRule()
						|| action == grammarAccess.getXEqualityExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXRelationalExpressionRule()
						|| action == grammarAccess.getXRelationalExpressionAccess().getXInstanceOfExpressionExpressionAction_1_0_0_0_0()
						|| action == grammarAccess.getXRelationalExpressionAccess().getXBinaryOperationLeftOperandAction_1_1_0_0_0()
						|| rule == grammarAccess.getXOtherOperatorExpressionRule()
						|| action == grammarAccess.getXOtherOperatorExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXAdditiveExpressionRule()
						|| action == grammarAccess.getXAdditiveExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXMultiplicativeExpressionRule()
						|| action == grammarAccess.getXMultiplicativeExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXUnaryOperationRule()
						|| rule == grammarAccess.getXCastedExpressionRule()
						|| action == grammarAccess.getXCastedExpressionAccess().getXCastedExpressionTargetAction_1_0_0_0()
						|| rule == grammarAccess.getXPostfixOperationRule()
						|| action == grammarAccess.getXPostfixOperationAccess().getXPostfixOperationOperandAction_1_0_0()
						|| rule == grammarAccess.getXMemberFeatureCallRule()
						|| action == grammarAccess.getXMemberFeatureCallAccess().getXAssignmentAssignableAction_1_0_0_0_0()
						|| action == grammarAccess.getXMemberFeatureCallAccess().getXMemberFeatureCallMemberCallTargetAction_1_1_0_0_0()
						|| rule == grammarAccess.getXPrimaryExpressionRule()
						|| rule == grammarAccess.getXParenthesizedExpressionRule()
						|| rule == grammarAccess.getXExpressionOrVarDeclarationRule()) {
					sequence_XBlockExpression(context, (XBlockExpression) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getXExpressionInClosureRule()) {
					sequence_XExpressionInClosure(context, (XBlockExpression) semanticObject); 
					return; 
				}
				else break;
			case XbasePackage.XBOOLEAN_LITERAL:
				sequence_XBooleanLiteral(context, (XBooleanLiteral) semanticObject); 
				return; 
			case XbasePackage.XCASE_PART:
				sequence_XCasePart(context, (XCasePart) semanticObject); 
				return; 
			case XbasePackage.XCASTED_EXPRESSION:
				sequence_XCastedExpression(context, (XCastedExpression) semanticObject); 
				return; 
			case XbasePackage.XCATCH_CLAUSE:
				sequence_XCatchClause(context, (XCatchClause) semanticObject); 
				return; 
			case XbasePackage.XCLOSURE:
				if (rule == grammarAccess.getXExpressionRule()
						|| rule == grammarAccess.getXAssignmentRule()
						|| action == grammarAccess.getXAssignmentAccess().getXBinaryOperationLeftOperandAction_1_1_0_0_0()
						|| rule == grammarAccess.getXOrExpressionRule()
						|| action == grammarAccess.getXOrExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXAndExpressionRule()
						|| action == grammarAccess.getXAndExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXEqualityExpressionRule()
						|| action == grammarAccess.getXEqualityExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXRelationalExpressionRule()
						|| action == grammarAccess.getXRelationalExpressionAccess().getXInstanceOfExpressionExpressionAction_1_0_0_0_0()
						|| action == grammarAccess.getXRelationalExpressionAccess().getXBinaryOperationLeftOperandAction_1_1_0_0_0()
						|| rule == grammarAccess.getXOtherOperatorExpressionRule()
						|| action == grammarAccess.getXOtherOperatorExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXAdditiveExpressionRule()
						|| action == grammarAccess.getXAdditiveExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXMultiplicativeExpressionRule()
						|| action == grammarAccess.getXMultiplicativeExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()
						|| rule == grammarAccess.getXUnaryOperationRule()
						|| rule == grammarAccess.getXCastedExpressionRule()
						|| action == grammarAccess.getXCastedExpressionAccess().getXCastedExpressionTargetAction_1_0_0_0()
						|| rule == grammarAccess.getXPostfixOperationRule()
						|| action == grammarAccess.getXPostfixOperationAccess().getXPostfixOperationOperandAction_1_0_0()
						|| rule == grammarAccess.getXMemberFeatureCallRule()
						|| action == grammarAccess.getXMemberFeatureCallAccess().getXAssignmentAssignableAction_1_0_0_0_0()
						|| action == grammarAccess.getXMemberFeatureCallAccess().getXMemberFeatureCallMemberCallTargetAction_1_1_0_0_0()
						|| rule == grammarAccess.getXPrimaryExpressionRule()
						|| rule == grammarAccess.getXLiteralRule()
						|| rule == grammarAccess.getXClosureRule()
						|| rule == grammarAccess.getXParenthesizedExpressionRule()
						|| rule == grammarAccess.getXExpressionOrVarDeclarationRule()) {
					sequence_XClosure(context, (XClosure) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getXShortClosureRule()) {
					sequence_XShortClosure(context, (XClosure) semanticObject); 
					return; 
				}
				else break;
			case XbasePackage.XCONSTRUCTOR_CALL:
				sequence_XConstructorCall(context, (XConstructorCall) semanticObject); 
				return; 
			case XbasePackage.XDO_WHILE_EXPRESSION:
				sequence_XDoWhileExpression(context, (XDoWhileExpression) semanticObject); 
				return; 
			case XbasePackage.XFEATURE_CALL:
				sequence_XFeatureCall(context, (XFeatureCall) semanticObject); 
				return; 
			case XbasePackage.XFOR_LOOP_EXPRESSION:
				sequence_XForLoopExpression(context, (XForLoopExpression) semanticObject); 
				return; 
			case XbasePackage.XIF_EXPRESSION:
				sequence_XIfExpression(context, (XIfExpression) semanticObject); 
				return; 
			case XbasePackage.XINSTANCE_OF_EXPRESSION:
				sequence_XRelationalExpression(context, (XInstanceOfExpression) semanticObject); 
				return; 
			case XbasePackage.XLIST_LITERAL:
				sequence_XListLiteral(context, (XListLiteral) semanticObject); 
				return; 
			case XbasePackage.XMEMBER_FEATURE_CALL:
				sequence_XMemberFeatureCall(context, (XMemberFeatureCall) semanticObject); 
				return; 
			case XbasePackage.XNULL_LITERAL:
				sequence_XNullLiteral(context, (XNullLiteral) semanticObject); 
				return; 
			case XbasePackage.XNUMBER_LITERAL:
				sequence_XNumberLiteral(context, (XNumberLiteral) semanticObject); 
				return; 
			case XbasePackage.XPOSTFIX_OPERATION:
				sequence_XPostfixOperation(context, (XPostfixOperation) semanticObject); 
				return; 
			case XbasePackage.XRETURN_EXPRESSION:
				sequence_XReturnExpression(context, (XReturnExpression) semanticObject); 
				return; 
			case XbasePackage.XSET_LITERAL:
				sequence_XSetLiteral(context, (XSetLiteral) semanticObject); 
				return; 
			case XbasePackage.XSTRING_LITERAL:
				sequence_XStringLiteral(context, (XStringLiteral) semanticObject); 
				return; 
			case XbasePackage.XSWITCH_EXPRESSION:
				sequence_XSwitchExpression(context, (XSwitchExpression) semanticObject); 
				return; 
			case XbasePackage.XSYNCHRONIZED_EXPRESSION:
				sequence_XSynchronizedExpression(context, (XSynchronizedExpression) semanticObject); 
				return; 
			case XbasePackage.XTHROW_EXPRESSION:
				sequence_XThrowExpression(context, (XThrowExpression) semanticObject); 
				return; 
			case XbasePackage.XTRY_CATCH_FINALLY_EXPRESSION:
				sequence_XTryCatchFinallyExpression(context, (XTryCatchFinallyExpression) semanticObject); 
				return; 
			case XbasePackage.XTYPE_LITERAL:
				sequence_XTypeLiteral(context, (XTypeLiteral) semanticObject); 
				return; 
			case XbasePackage.XUNARY_OPERATION:
				sequence_XUnaryOperation(context, (XUnaryOperation) semanticObject); 
				return; 
			case XbasePackage.XVARIABLE_DECLARATION:
				sequence_XVariableDeclaration(context, (XVariableDeclaration) semanticObject); 
				return; 
			case XbasePackage.XWHILE_EXPRESSION:
				sequence_XWhileExpression(context, (XWhileExpression) semanticObject); 
				return; 
			}
		else if (epackage == XcorePackage.eINSTANCE)
			switch (semanticObject.eClass().getClassifierID()) {
			case XcorePackage.XANNOTATION:
				sequence_XAnnotation(context, (XAnnotation) semanticObject); 
				return; 
			case XcorePackage.XANNOTATION_DIRECTIVE:
				sequence_XAnnotationDirective(context, (XAnnotationDirective) semanticObject); 
				return; 
			case XcorePackage.XATTRIBUTE:
				sequence_XAttribute(context, (XAttribute) semanticObject); 
				return; 
			case XcorePackage.XCLASS:
				sequence_XClass(context, (XClass) semanticObject); 
				return; 
			case XcorePackage.XDATA_TYPE:
				sequence_XDataType(context, (XDataType) semanticObject); 
				return; 
			case XcorePackage.XENUM:
				sequence_XEnum(context, (XEnum) semanticObject); 
				return; 
			case XcorePackage.XENUM_LITERAL:
				sequence_XEnumLiteral(context, (XEnumLiteral) semanticObject); 
				return; 
			case XcorePackage.XGENERIC_TYPE:
				if (rule == grammarAccess.getXGenericTypeRule()) {
					sequence_XGenericType(context, (XGenericType) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getXGenericTypeArgumentRule()) {
					sequence_XGenericType_XGenericWildcardTypeArgument(context, (XGenericType) semanticObject); 
					return; 
				}
				else if (rule == grammarAccess.getXGenericWildcardTypeArgumentRule()) {
					sequence_XGenericWildcardTypeArgument(context, (XGenericType) semanticObject); 
					return; 
				}
				else break;
			case XcorePackage.XIMPORT_DIRECTIVE:
				sequence_XImportDirective(context, (XImportDirective) semanticObject); 
				return; 
			case XcorePackage.XOPERATION:
				sequence_XOperation(context, (XOperation) semanticObject); 
				return; 
			case XcorePackage.XPACKAGE:
				sequence_XPackage(context, (XPackage) semanticObject); 
				return; 
			case XcorePackage.XPARAMETER:
				sequence_XParameter(context, (XParameter) semanticObject); 
				return; 
			case XcorePackage.XREFERENCE:
				sequence_XReference(context, (XReference) semanticObject); 
				return; 
			case XcorePackage.XSTRING_TO_STRING_MAP_ENTRY:
				sequence_XStringToStringMapEntry(context, (Map.Entry) semanticObject); 
				return; 
			case XcorePackage.XTYPE_PARAMETER:
				sequence_XTypeParameter(context, (XTypeParameter) semanticObject); 
				return; 
			}
		else if (epackage == XtypePackage.eINSTANCE)
			switch (semanticObject.eClass().getClassifierID()) {
			case XtypePackage.XFUNCTION_TYPE_REF:
				sequence_XFunctionTypeRef(context, (XFunctionTypeRef) semanticObject); 
				return; 
			case XtypePackage.XIMPORT_DECLARATION:
				sequence_XImportDeclaration(context, (XImportDeclaration) semanticObject); 
				return; 
			case XtypePackage.XIMPORT_SECTION:
				sequence_XImportSection(context, (XImportSection) semanticObject); 
				return; 
			}
		if (errorAcceptor != null)
			errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
	}
	
	/**
	 * Contexts:
	 *     XAnnotationDirective returns XAnnotationDirective
	 *
	 * Constraint:
	 *     (sourceURI=STRING name=ValidID)
	 */
	protected void sequence_XAnnotationDirective(ISerializationContext context, XAnnotationDirective semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, XcorePackage.Literals.XANNOTATION_DIRECTIVE__SOURCE_URI) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XcorePackage.Literals.XANNOTATION_DIRECTIVE__SOURCE_URI));
			if (transientValues.isValueTransient(semanticObject, XcorePackage.Literals.XNAMED_ELEMENT__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XcorePackage.Literals.XNAMED_ELEMENT__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getXAnnotationDirectiveAccess().getSourceURISTRINGTerminalRuleCall_0_0_1_0(), semanticObject.getSourceURI());
		feeder.accept(grammarAccess.getXAnnotationDirectiveAccess().getNameValidIDParserRuleCall_2_0(), semanticObject.getName());
		feeder.finish();
	}
	
	
	/**
	 * Contexts:
	 *     XAnnotation returns XAnnotation
	 *
	 * Constraint:
	 *     (source=[XAnnotationDirective|XQualifiedName] (details+=XStringToStringMapEntry details+=XStringToStringMapEntry*)?)
	 */
	protected void sequence_XAnnotation(ISerializationContext context, XAnnotation semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XMember returns XAttribute
	 *     XAttribute returns XAttribute
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         (
	 *             unordered?='unordered' | 
	 *             unique?='unique' | 
	 *             readonly?='readonly' | 
	 *             transient?='transient' | 
	 *             volatile?='volatile' | 
	 *             unsettable?='unsettable' | 
	 *             derived?='derived' | 
	 *             iD?='id'
	 *         )* 
	 *         type=XGenericType 
	 *         multiplicity=XMultiplicity? 
	 *         name=ID 
	 *         defaultValueLiteral=STRING? 
	 *         (getBody=XBlockExpression | setBody=XBlockExpression | isSetBody=XBlockExpression | unsetBody=XBlockExpression)*
	 *     )
	 */
	protected void sequence_XAttribute(ISerializationContext context, XAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XBlockExpression returns XBlockExpression
	 *     XExpression returns XBlockExpression
	 *     XAssignment returns XBlockExpression
	 *     XAssignment.XBinaryOperation_1_1_0_0_0 returns XBlockExpression
	 *     XOrExpression returns XBlockExpression
	 *     XOrExpression.XBinaryOperation_1_0_0_0 returns XBlockExpression
	 *     XAndExpression returns XBlockExpression
	 *     XAndExpression.XBinaryOperation_1_0_0_0 returns XBlockExpression
	 *     XEqualityExpression returns XBlockExpression
	 *     XEqualityExpression.XBinaryOperation_1_0_0_0 returns XBlockExpression
	 *     XRelationalExpression returns XBlockExpression
	 *     XRelationalExpression.XInstanceOfExpression_1_0_0_0_0 returns XBlockExpression
	 *     XRelationalExpression.XBinaryOperation_1_1_0_0_0 returns XBlockExpression
	 *     XOtherOperatorExpression returns XBlockExpression
	 *     XOtherOperatorExpression.XBinaryOperation_1_0_0_0 returns XBlockExpression
	 *     XAdditiveExpression returns XBlockExpression
	 *     XAdditiveExpression.XBinaryOperation_1_0_0_0 returns XBlockExpression
	 *     XMultiplicativeExpression returns XBlockExpression
	 *     XMultiplicativeExpression.XBinaryOperation_1_0_0_0 returns XBlockExpression
	 *     XUnaryOperation returns XBlockExpression
	 *     XCastedExpression returns XBlockExpression
	 *     XCastedExpression.XCastedExpression_1_0_0_0 returns XBlockExpression
	 *     XPostfixOperation returns XBlockExpression
	 *     XPostfixOperation.XPostfixOperation_1_0_0 returns XBlockExpression
	 *     XMemberFeatureCall returns XBlockExpression
	 *     XMemberFeatureCall.XAssignment_1_0_0_0_0 returns XBlockExpression
	 *     XMemberFeatureCall.XMemberFeatureCall_1_1_0_0_0 returns XBlockExpression
	 *     XPrimaryExpression returns XBlockExpression
	 *     XParenthesizedExpression returns XBlockExpression
	 *     XExpressionOrVarDeclaration returns XBlockExpression
	 *
	 * Constraint:
	 *     expressions+=XExpressionOrVarDeclaration*
	 */
	protected void sequence_XBlockExpression(ISerializationContext context, XBlockExpression semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XClassifier returns XClass
	 *     XClass returns XClass
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         (abstract?='abstract' | interface?='interface')? 
	 *         name=ID 
	 *         (typeParameters+=XTypeParameter typeParameters+=XTypeParameter*)? 
	 *         (superTypes+=XGenericType superTypes+=XGenericType*)? 
	 *         instanceType=JvmTypeReference? 
	 *         members+=XMember*
	 *     )
	 */
	protected void sequence_XClass(ISerializationContext context, XClass semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XClassifier returns XDataType
	 *     XDataType returns XDataType
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         name=ID 
	 *         (typeParameters+=XTypeParameter typeParameters+=XTypeParameter*)? 
	 *         instanceType=JvmTypeReference 
	 *         (convertBody=XBlockExpression? (serializable?='create' createBody=XBlockExpression)?)+
	 *     )
	 */
	protected void sequence_XDataType(ISerializationContext context, XDataType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XEnumLiteral returns XEnumLiteral
	 *
	 * Constraint:
	 *     (annotations+=XAnnotation* name=ID literal=STRING? value=SignedInt?)
	 */
	protected void sequence_XEnumLiteral(ISerializationContext context, XEnumLiteral semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XClassifier returns XEnum
	 *     XEnum returns XEnum
	 *
	 * Constraint:
	 *     (annotations+=XAnnotation* name=ID (literals+=XEnumLiteral literals+=XEnumLiteral*)?)
	 */
	protected void sequence_XEnum(ISerializationContext context, XEnum semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XGenericType returns XGenericType
	 *
	 * Constraint:
	 *     (type=[GenBase|XQualifiedName] (typeArguments+=XGenericTypeArgument typeArguments+=XGenericTypeArgument*)?)
	 */
	protected void sequence_XGenericType(ISerializationContext context, XGenericType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XGenericTypeArgument returns XGenericType
	 *
	 * Constraint:
	 *     (
	 *         (type=[GenBase|XQualifiedName] (typeArguments+=XGenericTypeArgument typeArguments+=XGenericTypeArgument*)?) | 
	 *         upperBound=XGenericType | 
	 *         lowerBound=XGenericType
	 *     )?
	 */
	protected void sequence_XGenericType_XGenericWildcardTypeArgument(ISerializationContext context, XGenericType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XGenericWildcardTypeArgument returns XGenericType
	 *
	 * Constraint:
	 *     (upperBound=XGenericType | lowerBound=XGenericType)?
	 */
	protected void sequence_XGenericWildcardTypeArgument(ISerializationContext context, XGenericType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XImportDirective returns XImportDirective
	 *
	 * Constraint:
	 *     (importedNamespace=QualifiedNameWithWildcard | importedObject=[EObject|QualifiedName])
	 */
	protected void sequence_XImportDirective(ISerializationContext context, XImportDirective semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XMember returns XOperation
	 *     XOperation returns XOperation
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         ((unordered?='unordered' unique?='unique'?) | (unique?='unique' unordered?='unordered'?))? 
	 *         (typeParameters+=XTypeParameter typeParameters+=XTypeParameter*)? 
	 *         type=XGenericType? 
	 *         multiplicity=XMultiplicity? 
	 *         name=ID 
	 *         (parameters+=XParameter parameters+=XParameter*)? 
	 *         (exceptions+=XGenericType exceptions+=XGenericType*)? 
	 *         body=XBlockExpression?
	 *     )
	 */
	protected void sequence_XOperation(ISerializationContext context, XOperation semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XPackage returns XPackage
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         name=QualifiedName 
	 *         importDirectives+=XImportDirective* 
	 *         annotationDirectives+=XAnnotationDirective* 
	 *         classifiers+=XClassifier*
	 *     )
	 */
	protected void sequence_XPackage(ISerializationContext context, XPackage semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XParameter returns XParameter
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         ((unordered?='unordered' unique?='unique'?) | (unique?='unique' unordered?='unordered'?))? 
	 *         type=XGenericType 
	 *         multiplicity=XMultiplicity? 
	 *         name=ID
	 *     )
	 */
	protected void sequence_XParameter(ISerializationContext context, XParameter semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XMember returns XReference
	 *     XReference returns XReference
	 *
	 * Constraint:
	 *     (
	 *         annotations+=XAnnotation* 
	 *         (
	 *             (containment?='contains' resolveProxies?='resolving'?) | 
	 *             (resolveProxies?='resolving' containment?='contains') | 
	 *             (container?='container' resolveProxies?='resolving'?) | 
	 *             (resolveProxies?='resolving' container?='container') | 
	 *             local?='local' | 
	 *             local?='local'
	 *         )? 
	 *         (
	 *             unordered?='unordered' | 
	 *             unique?='unique' | 
	 *             readonly?='readonly' | 
	 *             transient?='transient' | 
	 *             volatile?='volatile' | 
	 *             unsettable?='unsettable' | 
	 *             derived?='derived'
	 *         )* 
	 *         type=XGenericType 
	 *         multiplicity=XMultiplicity? 
	 *         name=ID 
	 *         opposite=[GenFeature|ValidID]? 
	 *         (keys+=[GenFeature|ValidID] keys+=[GenFeature|ValidID]*)? 
	 *         (getBody=XBlockExpression | setBody=XBlockExpression | isSetBody=XBlockExpression | unsetBody=XBlockExpression)*
	 *     )
	 */
	protected void sequence_XReference(ISerializationContext context, XReference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Contexts:
	 *     XStringToStringMapEntry returns XStringToStringMapEntry
	 *
	 * Constraint:
	 *     (key=QualifiedName value=STRING)
	 */
	protected void sequence_XStringToStringMapEntry(ISerializationContext context, Map.Entry semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient((EObject) semanticObject, XcorePackage.Literals.XSTRING_TO_STRING_MAP_ENTRY__KEY) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing((EObject) semanticObject, XcorePackage.Literals.XSTRING_TO_STRING_MAP_ENTRY__KEY));
			if (transientValues.isValueTransient((EObject) semanticObject, XcorePackage.Literals.XSTRING_TO_STRING_MAP_ENTRY__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing((EObject) semanticObject, XcorePackage.Literals.XSTRING_TO_STRING_MAP_ENTRY__VALUE));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, (EObject) semanticObject);
		feeder.accept(grammarAccess.getXStringToStringMapEntryAccess().getKeyQualifiedNameParserRuleCall_0_0(), semanticObject.getKey());
		feeder.accept(grammarAccess.getXStringToStringMapEntryAccess().getValueSTRINGTerminalRuleCall_2_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Contexts:
	 *     XTypeParameter returns XTypeParameter
	 *
	 * Constraint:
	 *     (annotations+=XAnnotation* name=ID (bounds+=XGenericType bounds+=XGenericType*)?)
	 */
	protected void sequence_XTypeParameter(ISerializationContext context, XTypeParameter semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
}
