📄 globalpackageimpl.java
字号:
/**
* <copyright>
* </copyright>
*
* $Id: GlobalPackageImpl.java 1 2006-06-12 17:37:42Z sxp $
*/
package edu.tsinghua.lumaqq.ecore.global.impl;
import edu.tsinghua.lumaqq.ecore.EcorePackage;
import edu.tsinghua.lumaqq.ecore.face.FacePackage;
import edu.tsinghua.lumaqq.ecore.face.impl.FacePackageImpl;
import edu.tsinghua.lumaqq.ecore.global.GlobalFactory;
import edu.tsinghua.lumaqq.ecore.global.GlobalPackage;
import edu.tsinghua.lumaqq.ecore.global.GlobalSetting;
import edu.tsinghua.lumaqq.ecore.global.LanguageType;
import edu.tsinghua.lumaqq.ecore.global.Robot;
import edu.tsinghua.lumaqq.ecore.global.Robots;
import edu.tsinghua.lumaqq.ecore.global.Servers;
import edu.tsinghua.lumaqq.ecore.group.GroupPackage;
import edu.tsinghua.lumaqq.ecore.group.impl.GroupPackageImpl;
import edu.tsinghua.lumaqq.ecore.impl.EcorePackageImpl;
import edu.tsinghua.lumaqq.ecore.login.LoginPackage;
import edu.tsinghua.lumaqq.ecore.login.impl.LoginPackageImpl;
import edu.tsinghua.lumaqq.ecore.option.OptionPackage;
import edu.tsinghua.lumaqq.ecore.option.impl.OptionPackageImpl;
import edu.tsinghua.lumaqq.ecore.proxy.ProxyPackage;
import edu.tsinghua.lumaqq.ecore.proxy.impl.ProxyPackageImpl;
import edu.tsinghua.lumaqq.ecore.remark.RemarkPackage;
import edu.tsinghua.lumaqq.ecore.remark.impl.RemarkPackageImpl;
import edu.tsinghua.lumaqq.ecore.reply.ReplyPackage;
import edu.tsinghua.lumaqq.ecore.reply.impl.ReplyPackageImpl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class GlobalPackageImpl extends EPackageImpl implements GlobalPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass globalSettingEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass serversEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass robotEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass robotsEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum languageTypeEEnum = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see edu.tsinghua.lumaqq.ecore.global.GlobalPackage#eNS_URI
* @see #init()
* @generated
*/
private GlobalPackageImpl() {
super(eNS_URI, GlobalFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this
* model, and for any others upon which it depends. Simple
* dependencies are satisfied by calling this method on all
* dependent packages before doing anything else. This method drives
* initialization for interdependent packages directly, in parallel
* with this package, itself.
* <p>Of this package and its interdependencies, all packages which
* have not yet been registered by their URI values are first created
* and registered. The packages are then initialized in two steps:
* meta-model objects for all of the packages are created before any
* are initialized, since one package's meta-model objects may refer to
* those of another.
* <p>Invocation of this method will not affect any packages that have
* already been initialized.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static GlobalPackage init() {
if (isInited) return (GlobalPackage)EPackage.Registry.INSTANCE.getEPackage(GlobalPackage.eNS_URI);
// Obtain or create and register package
GlobalPackageImpl theGlobalPackage = (GlobalPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof GlobalPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new GlobalPackageImpl());
isInited = true;
// Obtain or create and register interdependencies
EcorePackageImpl theEcorePackage = (EcorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI) instanceof EcorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI) : EcorePackage.eINSTANCE);
FacePackageImpl theFacePackage = (FacePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(FacePackage.eNS_URI) instanceof FacePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(FacePackage.eNS_URI) : FacePackage.eINSTANCE);
GroupPackageImpl theGroupPackage = (GroupPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GroupPackage.eNS_URI) instanceof GroupPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GroupPackage.eNS_URI) : GroupPackage.eINSTANCE);
LoginPackageImpl theLoginPackage = (LoginPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LoginPackage.eNS_URI) instanceof LoginPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LoginPackage.eNS_URI) : LoginPackage.eINSTANCE);
OptionPackageImpl theOptionPackage = (OptionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OptionPackage.eNS_URI) instanceof OptionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OptionPackage.eNS_URI) : OptionPackage.eINSTANCE);
ProxyPackageImpl theProxyPackage = (ProxyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProxyPackage.eNS_URI) instanceof ProxyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProxyPackage.eNS_URI) : ProxyPackage.eINSTANCE);
RemarkPackageImpl theRemarkPackage = (RemarkPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RemarkPackage.eNS_URI) instanceof RemarkPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RemarkPackage.eNS_URI) : RemarkPackage.eINSTANCE);
ReplyPackageImpl theReplyPackage = (ReplyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ReplyPackage.eNS_URI) instanceof ReplyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ReplyPackage.eNS_URI) : ReplyPackage.eINSTANCE);
// Create package meta-data objects
theGlobalPackage.createPackageContents();
theEcorePackage.createPackageContents();
theFacePackage.createPackageContents();
theGroupPackage.createPackageContents();
theLoginPackage.createPackageContents();
theOptionPackage.createPackageContents();
theProxyPackage.createPackageContents();
theRemarkPackage.createPackageContents();
theReplyPackage.createPackageContents();
// Initialize created meta-data
theGlobalPackage.initializePackageContents();
theEcorePackage.initializePackageContents();
theFacePackage.initializePackageContents();
theGroupPackage.initializePackageContents();
theLoginPackage.initializePackageContents();
theOptionPackage.initializePackageContents();
theProxyPackage.initializePackageContents();
theRemarkPackage.initializePackageContents();
theReplyPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theGlobalPackage.freeze();
return theGlobalPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getGlobalSetting() {
return globalSettingEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getGlobalSetting_Language() {
return (EAttribute)globalSettingEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getGlobalSetting_Servers() {
return (EReference)globalSettingEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getGlobalSetting_Robots() {
return (EReference)globalSettingEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getServers() {
return serversEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getServers_TCPServer() {
return (EAttribute)serversEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getServers_UDPServer() {
return (EAttribute)serversEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getRobot() {
return robotEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRobot_Class() {
return (EAttribute)robotEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRobot_Name() {
return (EAttribute)robotEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getRobots() {
return robotsEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getRobots_Robot() {
return (EReference)robotsEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getLanguageType() {
return languageTypeEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GlobalFactory getGlobalFactory() {
return (GlobalFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
globalSettingEClass = createEClass(GLOBAL_SETTING);
createEAttribute(globalSettingEClass, GLOBAL_SETTING__LANGUAGE);
createEReference(globalSettingEClass, GLOBAL_SETTING__SERVERS);
createEReference(globalSettingEClass, GLOBAL_SETTING__ROBOTS);
serversEClass = createEClass(SERVERS);
createEAttribute(serversEClass, SERVERS__TCP_SERVER);
createEAttribute(serversEClass, SERVERS__UDP_SERVER);
robotEClass = createEClass(ROBOT);
createEAttribute(robotEClass, ROBOT__CLASS);
createEAttribute(robotEClass, ROBOT__NAME);
robotsEClass = createEClass(ROBOTS);
createEReference(robotsEClass, ROBOTS__ROBOT);
// Create enums
languageTypeEEnum = createEEnum(LANGUAGE_TYPE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* 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);
// Add supertypes to classes
// Initialize classes and features; add operations and parameters
initEClass(globalSettingEClass, GlobalSetting.class, "GlobalSetting", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getGlobalSetting_Language(), this.getLanguageType(), "language", "zh", 1, 1, GlobalSetting.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getGlobalSetting_Servers(), this.getServers(), null, "servers", null, 1, 1, GlobalSetting.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getGlobalSetting_Robots(), this.getRobots(), null, "robots", null, 1, 1, GlobalSetting.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(serversEClass, Servers.class, "Servers", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getServers_TCPServer(), ecorePackage.getEString(), "TCPServer", null, 0, -1, Servers.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getServers_UDPServer(), ecorePackage.getEString(), "UDPServer", null, 0, -1, Servers.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(robotEClass, Robot.class, "Robot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getRobot_Class(), ecorePackage.getEString(), "class", null, 0, 1, Robot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getRobot_Name(), ecorePackage.getEString(), "name", null, 0, 1, Robot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(robotsEClass, Robots.class, "Robots", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getRobots_Robot(), this.getRobot(), null, "robot", null, 0, -1, Robots.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(languageTypeEEnum, LanguageType.class, "LanguageType");
addEEnumLiteral(languageTypeEEnum, LanguageType.ZH_LITERAL);
addEEnumLiteral(languageTypeEEnum, LanguageType.EN_LITERAL);
}
} //GlobalPackageImpl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -