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


Java XbasePackage.eINSTANCE方法代码示例

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


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

示例1: init

import org.eclipse.xtext.xbase.XbasePackage; //导入方法依赖的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

示例2: init

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

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

	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);
	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
	theXtypePackage.createPackageContents();
	theXAnnotationsPackage.createPackageContents();
	theXbasePackage.createPackageContents();

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

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

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


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