本文整理汇总了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;
}
示例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;
}