com.hammurapi.config.impl
Class NamedObjectDefinitionImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by com.hammurapi.config.impl.NamedObjectDefinitionImpl
All Implemented Interfaces:
Factory, Named, NamedObjectDefinition, ObjectDefinition, PropertySource, CommonObject, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject

public class NamedObjectDefinitionImpl
extends org.eclipse.emf.ecore.impl.EObjectImpl
implements NamedObjectDefinition

An implementation of the model object 'Named Object Definition'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
protected  org.eclipse.emf.common.util.EList<Path> classPath
          The cached value of the 'Class Path' containment reference list.
protected static String CONFIG_SCRIPT_EDEFAULT
          The default value of the 'Config Script' attribute.
protected  String configScript
          The cached value of the 'Config Script' attribute.
protected  Constructor constructor
          The cached value of the 'Constructor' containment reference.
protected  String description
          The cached value of the 'Description' attribute.
protected static String DESCRIPTION_EDEFAULT
          The default value of the 'Description' attribute.
protected  boolean enabled
          The cached value of the 'Enabled' attribute.
protected static boolean ENABLED_EDEFAULT
          The default value of the 'Enabled' attribute.
protected static String HOME_PAGE_EDEFAULT
          The default value of the 'Home Page' attribute.
protected  String homePage
          The cached value of the 'Home Page' attribute.
protected  String id
          The cached value of the 'Id' attribute.
protected static String ID_EDEFAULT
          The default value of the 'Id' attribute.
protected  String name
          The cached value of the 'Name' attribute.
protected static String NAME_EDEFAULT
          The default value of the 'Name' attribute.
protected  org.eclipse.emf.common.util.EList<Profile> profile
          The cached value of the 'Profile' containment reference list.
protected  org.eclipse.emf.common.util.EList<Named> property
          The cached value of the 'Property' containment reference list.
protected  org.eclipse.emf.common.util.EList<Role> roles
          The cached value of the 'Roles' containment reference list.
protected  boolean runtime
          The cached value of the 'Runtime' attribute.
protected static boolean RUNTIME_EDEFAULT
          The default value of the 'Runtime' attribute.
protected  org.eclipse.emf.common.util.EList<String> service
          The cached value of the 'Service' attribute list.
protected  org.eclipse.emf.common.util.EList<Source> source
          The cached value of the 'Source' containment reference list.
protected  org.eclipse.emf.common.util.EList<String> supportedExecutionEnvironments
          The cached value of the 'Supported Execution Environments' attribute list.
protected  String type
          The cached value of the 'Type' attribute.
protected static String TYPE_EDEFAULT
          The default value of the 'Type' attribute.
protected  String value
          The cached value of the 'Value' attribute.
protected static String VALUE_EDEFAULT
          The default value of the 'Value' attribute.
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected NamedObjectDefinitionImpl()
           
 
Method Summary
 org.eclipse.emf.common.notify.NotificationChain basicSetConstructor(Constructor newConstructor, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 void compile(org.eclipse.emf.common.util.EList<String> profilePath, TokenExpander.TokenSource tokens, ClassLoader classLoader, File dir, String targetPackage, String targetClass)
           
 FactoryClosure<Object> create(FactoryConfig factoryConfig)
           
static Object create(Object target, String propertyName)
          Looks for createXXX method and invokes it to create instance.
 int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
           
 int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
           
 Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
 org.eclipse.emf.common.util.EList<Path> getClassPath()
           
 String getConfigScript()
           
 Constructor getConstructor()
           
 String getDescription()
           
 String getHomePage()
           
 String getId()
           
 String getName()
           
 org.eclipse.emf.common.util.EList<Profile> getProfile()
           
 org.eclipse.emf.common.util.EList<Named> getProperty()
           
 org.eclipse.emf.common.util.EList<Role> getRoles()
           
 org.eclipse.emf.common.util.EList<String> getService()
           
 org.eclipse.emf.common.util.EList<Source> getSource()
           
 org.eclipse.emf.common.util.EList<String> getSupportedExecutionEnvironments()
           
 String getType()
           
 String getValue()
           
 void inject(InjectionConfig injectionConfig)
           
static void inject(String propertyName, FactoryClosure<?> factoryResult, Object target)
          Injects single value into object using addXXX or setXXX methods.
 void injectProperties(InjectionConfig injectionConfig)
           
 boolean isEnabled()
           
 boolean isRuntime()
           
 void setConfigScript(String newConfigScript)
           
 void setConstructor(Constructor newConstructor)
           
 void setDescription(String newDescription)
           
 void setEnabled(boolean newEnabled)
           
 void setHomePage(String newHomePage)
           
 void setId(String newId)
           
 void setName(String newName)
           
 void setRuntime(boolean newRuntime)
           
 void setType(String newType)
           
 void setValue(String newValue)
           
 String toString()
           
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
 
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.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
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

roles

protected org.eclipse.emf.common.util.EList<Role> roles
The cached value of the 'Roles' containment reference list.

See Also:
getRoles()

DESCRIPTION_EDEFAULT

protected static final String DESCRIPTION_EDEFAULT
The default value of the 'Description' attribute.

See Also:
getDescription()

description

protected String description
The cached value of the 'Description' attribute.

See Also:
getDescription()

CONFIG_SCRIPT_EDEFAULT

protected static final String CONFIG_SCRIPT_EDEFAULT
The default value of the 'Config Script' attribute.

See Also:
getConfigScript()

configScript

protected String configScript
The cached value of the 'Config Script' attribute.

See Also:
getConfigScript()

ID_EDEFAULT

protected static final String ID_EDEFAULT
The default value of the 'Id' attribute.

See Also:
getId()

id

protected String id
The cached value of the 'Id' attribute.

See Also:
getId()

source

protected org.eclipse.emf.common.util.EList<Source> source
The cached value of the 'Source' containment reference list.

See Also:
getSource()

ENABLED_EDEFAULT

protected static final boolean ENABLED_EDEFAULT
The default value of the 'Enabled' attribute.

See Also:
isEnabled(), Constant Field Values

enabled

protected boolean enabled
The cached value of the 'Enabled' attribute.

See Also:
isEnabled()

service

protected org.eclipse.emf.common.util.EList<String> service
The cached value of the 'Service' attribute list.

See Also:
getService()

supportedExecutionEnvironments

protected org.eclipse.emf.common.util.EList<String> supportedExecutionEnvironments
The cached value of the 'Supported Execution Environments' attribute list.

See Also:
getSupportedExecutionEnvironments()

HOME_PAGE_EDEFAULT

protected static final String HOME_PAGE_EDEFAULT
The default value of the 'Home Page' attribute.

See Also:
getHomePage()

homePage

protected String homePage
The cached value of the 'Home Page' attribute.

See Also:
getHomePage()

NAME_EDEFAULT

protected static final String NAME_EDEFAULT
The default value of the 'Name' attribute.

See Also:
getName()

name

protected String name
The cached value of the 'Name' attribute.

See Also:
getName()

RUNTIME_EDEFAULT

protected static final boolean RUNTIME_EDEFAULT
The default value of the 'Runtime' attribute.

See Also:
isRuntime(), Constant Field Values

runtime

protected boolean runtime
The cached value of the 'Runtime' attribute.

See Also:
isRuntime()

property

protected org.eclipse.emf.common.util.EList<Named> property
The cached value of the 'Property' containment reference list.

See Also:
getProperty()

profile

protected org.eclipse.emf.common.util.EList<Profile> profile
The cached value of the 'Profile' containment reference list.

See Also:
getProfile()

classPath

protected org.eclipse.emf.common.util.EList<Path> classPath
The cached value of the 'Class Path' containment reference list.

See Also:
getClassPath()

constructor

protected Constructor constructor
The cached value of the 'Constructor' containment reference.

See Also:
getConstructor()

VALUE_EDEFAULT

protected static final String VALUE_EDEFAULT
The default value of the 'Value' attribute.

See Also:
getValue()

value

protected String value
The cached value of the 'Value' attribute.

See Also:
getValue()

TYPE_EDEFAULT

protected static final String TYPE_EDEFAULT
The default value of the 'Type' attribute.

See Also:
getType()

type

protected String type
The cached value of the 'Type' attribute.

See Also:
getType()
Constructor Detail

NamedObjectDefinitionImpl

protected NamedObjectDefinitionImpl()

Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class org.eclipse.emf.ecore.impl.EObjectImpl

getRoles

public org.eclipse.emf.common.util.EList<Role> getRoles()

Specified by:
getRoles in interface CommonObject

getDescription

public String getDescription()

Specified by:
getDescription in interface Factory
Returns:
the value of the 'Description' attribute.
See Also:
Factory.setDescription(String), ConfigPackage.getFactory_Description()

setDescription

public void setDescription(String newDescription)

Specified by:
setDescription in interface Factory
Parameters:
newDescription - the new value of the 'Description' attribute.
See Also:
Factory.getDescription()

getConfigScript

public String getConfigScript()

Specified by:
getConfigScript in interface Factory
Returns:
the value of the 'Config Script' attribute.
See Also:
Factory.setConfigScript(String), ConfigPackage.getFactory_ConfigScript()

setConfigScript

public void setConfigScript(String newConfigScript)

Specified by:
setConfigScript in interface Factory
Parameters:
newConfigScript - the new value of the 'Config Script' attribute.
See Also:
Factory.getConfigScript()

getId

public String getId()

Specified by:
getId in interface Factory
Returns:
the value of the 'Id' attribute.
See Also:
Factory.setId(String), ConfigPackage.getFactory_Id()

setId

public void setId(String newId)

Specified by:
setId in interface Factory
Parameters:
newId - the new value of the 'Id' attribute.
See Also:
Factory.getId()

getSource

public org.eclipse.emf.common.util.EList<Source> getSource()

Specified by:
getSource in interface Factory
Returns:
the value of the 'Source' containment reference list.
See Also:
ConfigPackage.getFactory_Source()

isEnabled

public boolean isEnabled()

Specified by:
isEnabled in interface Factory
Returns:
the value of the 'Enabled' attribute.
See Also:
Factory.setEnabled(boolean), ConfigPackage.getFactory_Enabled()

setEnabled

public void setEnabled(boolean newEnabled)

Specified by:
setEnabled in interface Factory
Parameters:
newEnabled - the new value of the 'Enabled' attribute.
See Also:
Factory.isEnabled()

getService

public org.eclipse.emf.common.util.EList<String> getService()

Specified by:
getService in interface Factory
Returns:
the value of the 'Service' attribute list.
See Also:
ConfigPackage.getFactory_Service()

getSupportedExecutionEnvironments

public org.eclipse.emf.common.util.EList<String> getSupportedExecutionEnvironments()

Specified by:
getSupportedExecutionEnvironments in interface Factory
Returns:
the value of the 'Supported Execution Environments' attribute list.
See Also:
ConfigPackage.getFactory_SupportedExecutionEnvironments()

getHomePage

public String getHomePage()

Specified by:
getHomePage in interface Factory
Returns:
the value of the 'Home Page' attribute.
See Also:
Factory.setHomePage(String), ConfigPackage.getFactory_HomePage()

setHomePage

public void setHomePage(String newHomePage)

Specified by:
setHomePage in interface Factory
Parameters:
newHomePage - the new value of the 'Home Page' attribute.
See Also:
Factory.getHomePage()

getName

public String getName()

Specified by:
getName in interface Named
Returns:
the value of the 'Name' attribute.
See Also:
Named.setName(String), ConfigPackage.getNamed_Name()

setName

public void setName(String newName)

Specified by:
setName in interface Named
Parameters:
newName - the new value of the 'Name' attribute.
See Also:
Named.getName()

getProperty

public org.eclipse.emf.common.util.EList<Named> getProperty()

Specified by:
getProperty in interface PropertySource
Returns:
the value of the 'Property' containment reference list.
See Also:
ConfigPackage.getPropertySource_Property()

getProfile

public org.eclipse.emf.common.util.EList<Profile> getProfile()

Specified by:
getProfile in interface PropertySource
Returns:
the value of the 'Profile' containment reference list.
See Also:
ConfigPackage.getPropertySource_Profile(), Profile.getOwner()

getClassPath

public org.eclipse.emf.common.util.EList<Path> getClassPath()

Specified by:
getClassPath in interface PropertySource
Returns:
the value of the 'Class Path' containment reference list.
See Also:
ConfigPackage.getPropertySource_ClassPath()

getConstructor

public Constructor getConstructor()

Specified by:
getConstructor in interface ObjectDefinition
Returns:
the value of the 'Constructor' containment reference.
See Also:
ObjectDefinition.setConstructor(Constructor), ConfigPackage.getObjectDefinition_Constructor()

basicSetConstructor

public org.eclipse.emf.common.notify.NotificationChain basicSetConstructor(Constructor newConstructor,
                                                                           org.eclipse.emf.common.notify.NotificationChain msgs)


setConstructor

public void setConstructor(Constructor newConstructor)

Specified by:
setConstructor in interface ObjectDefinition
Parameters:
newConstructor - the new value of the 'Constructor' containment reference.
See Also:
ObjectDefinition.getConstructor()

getValue

public String getValue()

Specified by:
getValue in interface ObjectDefinition
Returns:
the value of the 'Value' attribute.
See Also:
ObjectDefinition.setValue(String), ConfigPackage.getObjectDefinition_Value()

setValue

public void setValue(String newValue)

Specified by:
setValue in interface ObjectDefinition
Parameters:
newValue - the new value of the 'Value' attribute.
See Also:
ObjectDefinition.getValue()

getType

public String getType()

Specified by:
getType in interface ObjectDefinition
Returns:
the value of the 'Type' attribute.
See Also:
ObjectDefinition.setType(String), ConfigPackage.getObjectDefinition_Type()

setType

public void setType(String newType)

Specified by:
setType in interface ObjectDefinition
Parameters:
newType - the new value of the 'Type' attribute.
See Also:
ObjectDefinition.getType()

isRuntime

public boolean isRuntime()

Specified by:
isRuntime in interface Named
Returns:
the value of the 'Runtime' attribute.
See Also:
Named.setRuntime(boolean), ConfigPackage.getNamed_Runtime()

setRuntime

public void setRuntime(boolean newRuntime)

Specified by:
setRuntime in interface Named
Parameters:
newRuntime - the new value of the 'Runtime' attribute.
See Also:
Named.isRuntime()

create

public FactoryClosure<Object> create(FactoryConfig factoryConfig)
                              throws ConfigurationException

Specified by:
create in interface Factory
Parameters:
factoryConfig - Factory configuration.
Throws:
ConfigurationException

compile

public void compile(org.eclipse.emf.common.util.EList<String> profilePath,
                    TokenExpander.TokenSource tokens,
                    ClassLoader classLoader,
                    File dir,
                    String targetPackage,
                    String targetClass)
             throws ConfigurationException

Specified by:
compile in interface Factory
Parameters:
profilePath - Profile path for compilation.
tokens - Expansion tokens.
classLoader - Class loader from which classes being used in the configuration script will be loaded for introspection during compilation. This class loader will be used as parent classloader for classloaders defined in the configuration file.
dir - Directory where to store generated files.
targetPackage - Target package for generated files.
targetClass - Target class name for generated file.
Throws:
ConfigurationException

eInverseAdd

public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                   int featureID,
                                                                   org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseAdd in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eGet

public Object eGet(int featureID,
                   boolean resolve,
                   boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eSet

public void eSet(int featureID,
                 Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eBaseStructuralFeatureID

public int eBaseStructuralFeatureID(int derivedFeatureID,
                                    Class<?> baseClass)

Specified by:
eBaseStructuralFeatureID in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eBaseStructuralFeatureID in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eDerivedStructuralFeatureID

public int eDerivedStructuralFeatureID(int baseFeatureID,
                                       Class<?> baseClass)

Specified by:
eDerivedStructuralFeatureID in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eDerivedStructuralFeatureID in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

toString

public String toString()

Overrides:
toString in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

inject

public static void inject(String propertyName,
                          FactoryClosure<?> factoryResult,
                          Object target)
                   throws ConfigurationException
Injects single value into object using addXXX or setXXX methods.

Parameters:
propertyName - Property name.
value - Value to be injected.
target - Injection target.
Throws:
ConfigurationException

create

public static Object create(Object target,
                            String propertyName)
                     throws ConfigurationException
Looks for createXXX method and invokes it to create instance.

Returns:
Throws:
ConfigurationException

inject

public void inject(InjectionConfig injectionConfig)
            throws ConfigurationException
Specified by:
inject in interface Named
Throws:
ConfigurationException

injectProperties

public void injectProperties(InjectionConfig injectionConfig)
                      throws ConfigurationException
Specified by:
injectProperties in interface PropertySource
Throws:
ConfigurationException