当前位置: 首页>>代码示例>>Java>>正文


Java XtypePackage.eINSTANCE方法代码示例

本文整理汇总了Java中org.eclipse.xtext.xtype.XtypePackage.eINSTANCE方法的典型用法代码示例。如果您正苦于以下问题:Java XtypePackage.eINSTANCE方法的具体用法?Java XtypePackage.eINSTANCE怎么用?Java XtypePackage.eINSTANCE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.xtext.xtype.XtypePackage的用法示例。


在下文中一共展示了XtypePackage.eINSTANCE方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.eclipse.xtext.xtype.XtypePackage; //导入方法依赖的package包/类
/**
 * 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 XbasePackage#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 XbasePackage init()
{
	if (isInited) return (XbasePackage)EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI);

	// Obtain or create and register package
	XbasePackageImpl theXbasePackage = (XbasePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XbasePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XbasePackageImpl());

	isInited = true;

	// Initialize simple dependencies
	TypesPackage.eINSTANCE.eClass();

	// Obtain or create and register interdependencies
	XAnnotationsPackageImpl theXAnnotationsPackage = (XAnnotationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI) instanceof XAnnotationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI) : XAnnotationsPackage.eINSTANCE);
	XtypePackageImpl theXtypePackage = (XtypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) instanceof XtypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) : XtypePackage.eINSTANCE);

	// Create package meta-data objects
	theXbasePackage.createPackageContents();
	theXAnnotationsPackage.createPackageContents();
	theXtypePackage.createPackageContents();

	// Initialize created meta-data
	theXbasePackage.initializePackageContents();
	theXAnnotationsPackage.initializePackageContents();
	theXtypePackage.initializePackageContents();

	// Mark meta-data to indicate it can't be changed
	theXbasePackage.freeze();

 
	// Update the registry and return the package
	EPackage.Registry.INSTANCE.put(XbasePackage.eNS_URI, theXbasePackage);
	return theXbasePackage;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:47,代码来源:XbasePackageImpl.java

示例2: init

import org.eclipse.xtext.xtype.XtypePackage; //导入方法依赖的package包/类
/**
 * 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 XAnnotationsPackage#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 XAnnotationsPackage init()
{
	if (isInited) return (XAnnotationsPackage)EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI);

	// Obtain or create and register package
	XAnnotationsPackageImpl theXAnnotationsPackage = (XAnnotationsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XAnnotationsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XAnnotationsPackageImpl());

	isInited = true;

	// Initialize simple dependencies
	TypesPackage.eINSTANCE.eClass();

	// Obtain or create and register interdependencies
	XtypePackageImpl theXtypePackage = (XtypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) instanceof XtypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) : XtypePackage.eINSTANCE);
	XbasePackageImpl theXbasePackage = (XbasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI) instanceof XbasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI) : XbasePackage.eINSTANCE);

	// Create package meta-data objects
	theXAnnotationsPackage.createPackageContents();
	theXtypePackage.createPackageContents();
	theXbasePackage.createPackageContents();

	// Initialize created meta-data
	theXAnnotationsPackage.initializePackageContents();
	theXtypePackage.initializePackageContents();
	theXbasePackage.initializePackageContents();

	// Mark meta-data to indicate it can't be changed
	theXAnnotationsPackage.freeze();

 
	// Update the registry and return the package
	EPackage.Registry.INSTANCE.put(XAnnotationsPackage.eNS_URI, theXAnnotationsPackage);
	return theXAnnotationsPackage;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:47,代码来源:XAnnotationsPackageImpl.java

示例3: sequence

import org.eclipse.xtext.xtype.XtypePackage; //导入方法依赖的package包/类
@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_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 == 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));
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:70,代码来源:AbstractXtypeSemanticSequencer.java


注:本文中的org.eclipse.xtext.xtype.XtypePackage.eINSTANCE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。