org.eclipse.emf.ecore.impl
Class EPackageImpl

java.lang.Object
  |
  +--org.eclipse.emf.common.notify.impl.NotifierImpl
        |
        +--org.eclipse.emf.ecore.impl.EObjectImpl
              |
              +--org.eclipse.emf.ecore.impl.EModelElementImpl
                    |
                    +--org.eclipse.emf.ecore.impl.ENamedElementImpl
                          |
                          +--org.eclipse.emf.ecore.impl.EPackageImpl
All Implemented Interfaces:
EModelElement, ENamedElement, EObject, EPackage, InternalEObject, Notifier
Direct Known Subclasses:
EcorePackageImpl, GenModelPackageImpl, MappingPackageImpl, TreePackageImpl

public class EPackageImpl
extends ENamedElementImpl
implements EPackage

An implementation of the model object 'EPackage'.

The following features are implemented:


Inner classes inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
EObjectImpl.EPropertiesHolder, EObjectImpl.EPropertiesHolderImpl
 
Inner classes inherited from class org.eclipse.emf.ecore.EPackage
EPackage.Descriptor, EPackage.Registry
 
Field Summary
protected  EList eClassifiers
          The cached value of the 'EClassifiers' containment reference list.
protected  EcoreFactory ecoreFactory
          The Ecore factory.
protected  EcorePackage ecorePackage
          The Ecore factory.
protected  EFactory eFactoryInstance
          The cached value of the 'EFactory Instance' reference.
protected  java.util.Map eNameToEClassifierMap
          The map from name to
protected  EList eSubpackages
          The cached value of the 'ESubpackages' containment reference list.
protected static boolean IS_ABSTRACT
           
protected static boolean IS_CHANGEABLE
           
protected static boolean IS_COMPOSITE
           
protected static boolean IS_ID
           
protected static boolean IS_INTERFACE
           
protected static boolean IS_RESOLVABLE
           
protected static boolean IS_RESOLVE_PROXIES
           
protected static boolean IS_SERIALIZABLE
           
protected static boolean IS_TRANSIENT
           
protected static boolean IS_UNIQUE
           
protected static boolean IS_UNSETTABLE
           
protected static boolean IS_VOLATILE
           
protected static java.lang.String NS_PREFIX_EDEFAULT
          The default value of the 'Ns Prefix' attribute.
protected static java.lang.String NS_URI_EDEFAULT
          The default value of the 'Ns URI' attribute.
protected  java.lang.String nsPrefix
          The cached value of the 'Ns Prefix' attribute.
protected  java.lang.String nsURI
          The cached value of the 'Ns URI' attribute.
 
Fields inherited from class org.eclipse.emf.ecore.impl.ENamedElementImpl
name, NAME_EDEFAULT
 
Fields inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl
eAnnotations
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eContainer, eContainerFeatureID, ELAST_EOBJECT_FLAG, eProperties
 
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected EPackageImpl()
          Creates an instance.
protected EPackageImpl(EFactory eFactory)
          Creates an instance with a factory.
protected EPackageImpl(java.lang.String packageURI)
          Creates a registered instance that has a default factory.
protected EPackageImpl(java.lang.String packageURI, EFactory factory)
          Creates a registered instance with a factory.
 
Method Summary
protected  void addAnnotation(ENamedElement eNamedElement, java.lang.String source, java.lang.String[] details)
           
protected  void addEEnumLiteral(EEnum owner, Enumerator e)
           
protected  EOperation addEOperation(EClass owner, EClassifier type, java.lang.String name)
           
protected  void addEParameter(EOperation owner, EClassifier type, java.lang.String name)
           
 NotificationChain basicSetEFactoryInstance(EFactory newEFactoryInstance, NotificationChain msgs)
          
protected  void createEAttribute(EClass owner, int id)
           
protected  EClass createEClass(int id)
           
protected  EDataType createEDataType(int id)
           
protected  EEnum createEEnum(int id)
           
protected  void createEReference(EClass owner, int id)
           
protected  Resource createResource(java.lang.String uri)
           
 NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
          
 java.lang.Object eGet(EStructuralFeature eFeature, boolean resolve)
          
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, java.lang.Class baseClass, NotificationChain msgs)
          
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, java.lang.Class baseClass, NotificationChain msgs)
          
 boolean eIsSet(EStructuralFeature eFeature)
          
 void eSet(EStructuralFeature eFeature, java.lang.Object newValue)
          
protected  EClass eStaticClass()
          
 void eUnset(EStructuralFeature eFeature)
          
 EClassifier getEClassifier(java.lang.String name)
           Returns the classifier with the given name.
 EList getEClassifiers()
          
 EFactory getEFactoryInstance()
          
 EList getESubpackages()
          
 EPackage getESuperPackage()
          
 java.lang.String getNsPrefix()
          
 java.lang.String getNsURI()
          
protected  EAttribute initEAttribute(EAttribute a, EClassifier type, java.lang.String name, java.lang.String defaultValue, int lowerBound, int upperBound, boolean isTransient, boolean isVolatile, boolean isChangeable, boolean isUnsettable)
          Deprecated.  
protected  EAttribute initEAttribute(EAttribute a, EClassifier type, java.lang.String name, java.lang.String defaultValue, int lowerBound, int upperBound, boolean isTransient, boolean isVolatile, boolean isChangeable, boolean isUnsettable, boolean isID)
          Deprecated.  
protected  EAttribute initEAttribute(EAttribute a, EClassifier type, java.lang.String name, java.lang.String defaultValue, int lowerBound, int upperBound, boolean isTransient, boolean isVolatile, boolean isChangeable, boolean isUnsettable, boolean isID, boolean isUnique)
           
protected  EClass initEClass(EClass c, java.lang.Class instanceClass, java.lang.String name, boolean isAbstract, boolean isInterface)
           
protected  EDataType initEDataType(EDataType d, java.lang.Class instanceClass, java.lang.String name, boolean isSerializable)
           
protected  EEnum initEEnum(EEnum e, java.lang.Class instanceClass, java.lang.String name)
           
protected  EReference initEReference(EReference r, EClassifier type, EReference otherEnd, java.lang.String name, java.lang.String defaultValue, int lowerBound, int upperBound, boolean isTransient, boolean isVolatile, boolean isChangeable, boolean isContainment, boolean isResolveProxies)
          Deprecated.  
protected  EReference initEReference(EReference r, EClassifier type, EReference otherEnd, java.lang.String name, java.lang.String defaultValue, int lowerBound, int upperBound, boolean isTransient, boolean isVolatile, boolean isChangeable, boolean isContainment, boolean isResolveProxies, boolean isUnsettable)
          Deprecated.  
protected  EReference initEReference(EReference r, EClassifier type, EReference otherEnd, java.lang.String name, java.lang.String defaultValue, int lowerBound, int upperBound, boolean isTransient, boolean isVolatile, boolean isChangeable, boolean isContainment, boolean isResolveProxies, boolean isUnsettable, boolean isUnique)
           
 void setEFactoryInstance(EFactory newEFactoryInstance)
          
 void setNamespaceURI(java.lang.String nsURI)
           
 void setNsPrefix(java.lang.String newNsPrefix)
          
 void setNsURI(java.lang.String newNsURI)
          
 java.lang.String toString()
          
 
Methods inherited from class org.eclipse.emf.ecore.impl.ENamedElementImpl
getName, getNameGen, setName
 
Methods inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl
eObjectForURIFragmentSegment, eURIFragmentSegment, getEAnnotation, getEAnnotations
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicSetContainer, eBasicSetContainer, eClass, eContainer, eContainerFeatureID, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicFeatureID, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicSet, eDynamicUnset, eGet, eHasSettings, eInternalContainer, eInternalResource, eIsProxy, eProperties, eProxyURI, eResource, eSetClass, eSetProxyURI, eSetResource, eSetting, eSettingDelegate, eSettings, eStaticFeatureCount
 
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, eDeliver, eNotificationRequired, eNotify, eSetDeliver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement
getName, setName
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainmentFeature, eContents, eCrossReferences, eGet, eIsProxy, eResource
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

NS_URI_EDEFAULT

protected static final java.lang.String NS_URI_EDEFAULT
The default value of the 'Ns URI' attribute.
See Also:
getNsURI()

ecoreFactory

protected EcoreFactory ecoreFactory
The Ecore factory.

ecorePackage

protected EcorePackage ecorePackage
The Ecore factory.

eNameToEClassifierMap

protected java.util.Map eNameToEClassifierMap
The map from name to

nsURI

protected java.lang.String nsURI
The cached value of the 'Ns URI' attribute.
See Also:
getNsURI()

NS_PREFIX_EDEFAULT

protected static final java.lang.String NS_PREFIX_EDEFAULT
The default value of the 'Ns Prefix' attribute.
See Also:
getNsPrefix()

nsPrefix

protected java.lang.String nsPrefix
The cached value of the 'Ns Prefix' attribute.
See Also:
getNsPrefix()

eFactoryInstance

protected EFactory eFactoryInstance
The cached value of the 'EFactory Instance' reference.
See Also:
getEFactoryInstance()

eClassifiers

protected EList eClassifiers
The cached value of the 'EClassifiers' containment reference list.
See Also:
getEClassifiers()

eSubpackages

protected EList eSubpackages
The cached value of the 'ESubpackages' containment reference list.
See Also:
getESubpackages()

IS_ABSTRACT

protected static final boolean IS_ABSTRACT

IS_INTERFACE

protected static final boolean IS_INTERFACE

IS_SERIALIZABLE

protected static final boolean IS_SERIALIZABLE

IS_TRANSIENT

protected static final boolean IS_TRANSIENT

IS_VOLATILE

protected static final boolean IS_VOLATILE

IS_CHANGEABLE

protected static final boolean IS_CHANGEABLE

IS_UNSETTABLE

protected static final boolean IS_UNSETTABLE

IS_UNIQUE

protected static final boolean IS_UNIQUE

IS_ID

protected static final boolean IS_ID

IS_COMPOSITE

protected static final boolean IS_COMPOSITE

IS_RESOLVE_PROXIES

protected static final boolean IS_RESOLVE_PROXIES

IS_RESOLVABLE

protected static final boolean IS_RESOLVABLE
Constructor Detail

EPackageImpl

protected EPackageImpl()
Creates an instance.

EPackageImpl

protected EPackageImpl(EFactory eFactory)
Creates an instance with a factory.
Parameters:
eFactory - the factory of the new package.

EPackageImpl

protected EPackageImpl(java.lang.String packageURI)
Creates a registered instance that has a default factory.
Parameters:
packageURI - the registered namespace URI of the new package.

EPackageImpl

protected EPackageImpl(java.lang.String packageURI,
                       EFactory factory)
Creates a registered instance with a factory.
Parameters:
packageURI - the registered namespace URI of the new package.
eFactory - the factory of the new package.
Method Detail

eStaticClass

protected EClass eStaticClass()
Overrides:
eStaticClass in class ENamedElementImpl

setNamespaceURI

public void setNamespaceURI(java.lang.String nsURI)

eGet

public java.lang.Object eGet(EStructuralFeature eFeature,
                             boolean resolve)
Specified by:
eGet in interface EObject
Overrides:
eGet in class ENamedElementImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature of the value to fetch.
resolve - whether to resolve.
Returns:
the value of the given feature of the object.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features.
See Also:
InternalEList.basicIterator(), InternalEList.basicList(), EcoreUtil.resolve(EObject, ResourceSet), EObject.eSet(EStructuralFeature, Object), EObject.eUnset(EStructuralFeature), EObject.eIsSet(EStructuralFeature), EObject.eGet(EStructuralFeature)

eIsSet

public boolean eIsSet(EStructuralFeature eFeature)
Specified by:
eIsSet in interface EObject
Overrides:
eIsSet in class ENamedElementImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature in question.
Returns:
whether the feature of the object is set.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features.
See Also:
EObject.eSet(EStructuralFeature, Object), EObject.eUnset(EStructuralFeature), EObject.eGet(EStructuralFeature, boolean)

eSet

public void eSet(EStructuralFeature eFeature,
                 java.lang.Object newValue)
Specified by:
eSet in interface EObject
Overrides:
eSet in class ENamedElementImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature of the value to set.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features, or it isn't changeable.
java.lang.ClassCastException - if there is a type conflict.
ArrayStoreException - if there is a type conflect.
See Also:
EObject.eUnset(EStructuralFeature), EObject.eIsSet(EStructuralFeature), EObject.eGet(EStructuralFeature, boolean)

eUnset

public void eUnset(EStructuralFeature eFeature)
Specified by:
eUnset in interface EObject
Overrides:
eUnset in class ENamedElementImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature in question.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features, or it isn't changeable.
See Also:
EObject.eIsSet(EStructuralFeature), EObject.eSet(EStructuralFeature, Object), EObject.eGet(EStructuralFeature, boolean)

getNsURI

public java.lang.String getNsURI()
Specified by:
getNsURI in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Returns:
the value of the 'Ns URI' attribute.
See Also:
EPackage.Registry.INSTANCE, EPackage.setNsURI(String), EcorePackage.getEPackage_NsURI()

setNsURI

public void setNsURI(java.lang.String newNsURI)
Specified by:
setNsURI in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Parameters:
value - the new value of the 'Ns URI' attribute.
See Also:
EPackage.getNsURI()

getNsPrefix

public java.lang.String getNsPrefix()
Specified by:
getNsPrefix in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Returns:
the value of the 'Ns Prefix' attribute.
See Also:
EPackage.setNsPrefix(String), EcorePackage.getEPackage_NsPrefix()

setNsPrefix

public void setNsPrefix(java.lang.String newNsPrefix)
Specified by:
setNsPrefix in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Parameters:
value - the new value of the 'Ns Prefix' attribute.
See Also:
EPackage.getNsPrefix()

getEFactoryInstance

public EFactory getEFactoryInstance()
Specified by:
getEFactoryInstance in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Returns:
the value of the 'EFactory Instance' reference.
See Also:
EPackage.setEFactoryInstance(EFactory), EcorePackage.getEPackage_EFactoryInstance(), EFactory.getEPackage()

setEFactoryInstance

public void setEFactoryInstance(EFactory newEFactoryInstance)
Specified by:
setEFactoryInstance in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Parameters:
value - the new value of the 'EFactory Instance' reference.
See Also:
EPackage.getEFactoryInstance()

basicSetEFactoryInstance

public NotificationChain basicSetEFactoryInstance(EFactory newEFactoryInstance,
                                                  NotificationChain msgs)

getEClassifiers

public EList getEClassifiers()
Specified by:
getEClassifiers in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Returns:
the value of the 'EClassifiers' containment reference list.
See Also:
EcorePackage.getEPackage_EClassifiers(), EClassifier.getEPackage()

getEClassifier

public EClassifier getEClassifier(java.lang.String name)
Description copied from interface: EPackage
Returns the classifier with the given name.
Specified by:
getEClassifier in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Parameters:
name - the name in question.
Returns:
the classifier with the given name.

getESubpackages

public EList getESubpackages()
Specified by:
getESubpackages in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Returns:
the value of the 'ESubpackages' containment reference list.
See Also:
EcorePackage.getEPackage_ESubpackages(), EPackage.getESuperPackage()

getESuperPackage

public EPackage getESuperPackage()
Specified by:
getESuperPackage in interface EPackage
Following copied from interface: org.eclipse.emf.ecore.EPackage
Returns:
the value of the 'ESuper Package' container reference.
See Also:
EcorePackage.getEPackage_ESuperPackage(), EPackage.getESubpackages()

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     java.lang.Class baseClass,
                                     NotificationChain msgs)
Overrides:
eInverseAdd in class ENamedElementImpl
Following copied from interface: org.eclipse.emf.ecore.InternalEObject
Returns:
accumulated notifications.

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        java.lang.Class baseClass,
                                        NotificationChain msgs)
Overrides:
eInverseRemove in class ENamedElementImpl
Following copied from interface: org.eclipse.emf.ecore.InternalEObject
Returns:
accumulated notifications.

eBasicRemoveFromContainer

public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
Overrides:
eBasicRemoveFromContainer in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.InternalEObject
Returns:
accumulated notifications.

toString

public java.lang.String toString()
Overrides:
toString in class ENamedElementImpl

createResource

protected Resource createResource(java.lang.String uri)

createEClass

protected EClass createEClass(int id)

createEEnum

protected EEnum createEEnum(int id)

createEDataType

protected EDataType createEDataType(int id)

createEAttribute

protected void createEAttribute(EClass owner,
                                int id)

createEReference

protected void createEReference(EClass owner,
                                int id)

initEClass

protected EClass initEClass(EClass c,
                            java.lang.Class instanceClass,
                            java.lang.String name,
                            boolean isAbstract,
                            boolean isInterface)

initEEnum

protected EEnum initEEnum(EEnum e,
                          java.lang.Class instanceClass,
                          java.lang.String name)

initEDataType

protected EDataType initEDataType(EDataType d,
                                  java.lang.Class instanceClass,
                                  java.lang.String name,
                                  boolean isSerializable)

initEAttribute

protected EAttribute initEAttribute(EAttribute a,
                                    EClassifier type,
                                    java.lang.String name,
                                    java.lang.String defaultValue,
                                    int lowerBound,
                                    int upperBound,
                                    boolean isTransient,
                                    boolean isVolatile,
                                    boolean isChangeable,
                                    boolean isUnsettable)
Deprecated.  


initEAttribute

protected EAttribute initEAttribute(EAttribute a,
                                    EClassifier type,
                                    java.lang.String name,
                                    java.lang.String defaultValue,
                                    int lowerBound,
                                    int upperBound,
                                    boolean isTransient,
                                    boolean isVolatile,
                                    boolean isChangeable,
                                    boolean isUnsettable,
                                    boolean isID)
Deprecated.  


initEAttribute

protected EAttribute initEAttribute(EAttribute a,
                                    EClassifier type,
                                    java.lang.String name,
                                    java.lang.String defaultValue,
                                    int lowerBound,
                                    int upperBound,
                                    boolean isTransient,
                                    boolean isVolatile,
                                    boolean isChangeable,
                                    boolean isUnsettable,
                                    boolean isID,
                                    boolean isUnique)

initEReference

protected EReference initEReference(EReference r,
                                    EClassifier type,
                                    EReference otherEnd,
                                    java.lang.String name,
                                    java.lang.String defaultValue,
                                    int lowerBound,
                                    int upperBound,
                                    boolean isTransient,
                                    boolean isVolatile,
                                    boolean isChangeable,
                                    boolean isContainment,
                                    boolean isResolveProxies)
Deprecated.  


initEReference

protected EReference initEReference(EReference r,
                                    EClassifier type,
                                    EReference otherEnd,
                                    java.lang.String name,
                                    java.lang.String defaultValue,
                                    int lowerBound,
                                    int upperBound,
                                    boolean isTransient,
                                    boolean isVolatile,
                                    boolean isChangeable,
                                    boolean isContainment,
                                    boolean isResolveProxies,
                                    boolean isUnsettable)
Deprecated.  


initEReference

protected EReference initEReference(EReference r,
                                    EClassifier type,
                                    EReference otherEnd,
                                    java.lang.String name,
                                    java.lang.String defaultValue,
                                    int lowerBound,
                                    int upperBound,
                                    boolean isTransient,
                                    boolean isVolatile,
                                    boolean isChangeable,
                                    boolean isContainment,
                                    boolean isResolveProxies,
                                    boolean isUnsettable,
                                    boolean isUnique)

addEOperation

protected EOperation addEOperation(EClass owner,
                                   EClassifier type,
                                   java.lang.String name)

addEParameter

protected void addEParameter(EOperation owner,
                             EClassifier type,
                             java.lang.String name)

addEEnumLiteral

protected void addEEnumLiteral(EEnum owner,
                               Enumerator e)

addAnnotation

protected void addAnnotation(ENamedElement eNamedElement,
                             java.lang.String source,
                             java.lang.String[] details)

Copyright 2001-2003 IBM Corporation and others.
All Rights Reserved.