edu.cmu.sei.aadl.model.property.impl
Class PropertyConstantImpl

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 edu.cmu.sei.aadl.model.core.impl.AObjectImpl
                  extended by edu.cmu.sei.aadl.model.core.impl.NamedElementImpl
                      extended by edu.cmu.sei.aadl.model.property.impl.PropertyConstantImpl
All Implemented Interfaces:
AObject, NamedElement, PropertyConstant, PropertyValueHolder, ReferencedProperty, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject

public class PropertyConstantImpl
extends NamedElementImpl
implements PropertyConstant

An implementation of the model object 'Constant'.

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 java.lang.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 constantValue
          The cached value of the 'Constant Value' containment reference list
static java.lang.String copyright
           
protected  boolean list
          The cached value of the 'List' attribute
protected static boolean LIST_EDEFAULT
          The default value of the 'List' attribute
protected  PropertyConstantType propertyType
          The cached value of the 'Property Type' containment reference
protected  PropertyConstantType propertyTypeReference
          The cached value of the 'Property Type Reference' reference
 
Fields inherited from class edu.cmu.sei.aadl.model.core.impl.NamedElementImpl
name, NAME_EDEFAULT
 
Fields inherited from class edu.cmu.sei.aadl.model.core.impl.AObjectImpl
comment, locationReference
 
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 PropertyConstantImpl()
           
 
Method Summary
 void addConstantValue(PropertyValue newConstantValue)
          phf: add element to multiplicity EList
 PropertyConstantType basicGetPropertyTypeReference()
           
 org.eclipse.emf.common.notify.NotificationChain basicSetPropertyType(PropertyConstantType newPropertyType, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 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, java.lang.Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
 AadlPropertyValue evaluate(java.lang.String sign, java.util.Map modes, PropertyHolder context)
          Evaluate a referenced property.
 org.eclipse.emf.common.util.EList getConstantValue()
           
 ParsedPropertyReference getParsedPropertyReference()
          get parsed property reference
 PropertySet getPropertySet()
          Get the containing Property set.
 PropertyConstantType getPropertyType()
           
 PropertyConstantType getPropertyTypeReference()
           
 java.lang.String getQualifiedName()
          get the qualified property name
 org.eclipse.emf.common.util.EList getSignedConstantValue(java.lang.String sign)
          This is a very special purpose method: when it is known that the property constant is a non-list of numeric-type, that is the type of the property constant is aadlreal or aadlinteger, then this method applies the given sign to the single numeric value in the properyt constant and returns a new NumberValue that is the result.
 PropertyType getThePropertyType()
          returns the property type of a property constant.
 boolean isList()
           
 void preEvaluate(PropertyHolder context, java.util.Set reqModeContexts)
          Pre-evaluate a property value to determine which ComponentImpls have modes that can affect the property value.
 void setList(boolean newList)
          phf: we want an add version for EList
 void setParsedPropertyReference(ParsedPropertyReference ppr)
          set parsed property reference
 void setPropertyType(PropertyConstantType newPropertyType)
           
 void setPropertyTypeReference(PropertyConstantType newPropertyTypeReference)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cmu.sei.aadl.model.core.impl.NamedElementImpl
checkName, getName, setName
 
Methods inherited from class edu.cmu.sei.aadl.model.core.impl.AObjectImpl
addComment, eObjectForURIFragmentSegment, eURIFragmentSegment, getAadlSpec, getAdapter, getAObjectRoot, getChildren, getComment, getContainingClassifier, getContainingClassifierNameSpace, getContainingComponentImpl, getContainingComponentType, getContainingPropertyAssociationDefinitionConstant, getContainingSubcomponent, getLocationReference, getReferencedObject, getSecondReferencedObject, getSystemInstance, setLocationReference, setLocationReference
 
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, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, 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, eInverseAdd, eInverseRemove, eIsSet, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.NamedElement
getName, setName
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.AObject
addComment, getAadlSpec, getAObjectRoot, getChildren, getComment, getContainingClassifier, getContainingClassifierNameSpace, getContainingComponentImpl, getContainingComponentType, getContainingPropertyAssociationDefinitionConstant, getContainingSubcomponent, getLocationReference, getReferencedObject, getSecondReferencedObject, getSystemInstance, setLocationReference, setLocationReference
 
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.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values

LIST_EDEFAULT

protected static final boolean LIST_EDEFAULT
The default value of the 'List' attribute.

See Also:
isList(), Constant Field Values

list

protected boolean list
The cached value of the 'List' attribute.

See Also:
isList()

propertyTypeReference

protected PropertyConstantType propertyTypeReference
The cached value of the 'Property Type Reference' reference.

See Also:
getPropertyTypeReference()

propertyType

protected PropertyConstantType propertyType
The cached value of the 'Property Type' containment reference.

See Also:
getPropertyType()

constantValue

protected org.eclipse.emf.common.util.EList constantValue
The cached value of the 'Constant Value' containment reference list.

See Also:
getConstantValue()
Constructor Detail

PropertyConstantImpl

protected PropertyConstantImpl()

Method Detail

eStaticClass

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

Overrides:
eStaticClass in class NamedElementImpl

getConstantValue

public org.eclipse.emf.common.util.EList getConstantValue()

Specified by:
getConstantValue in interface PropertyConstant
Returns:
the value of the 'Constant Value' containment reference list.
See Also:
PropertyPackage.getPropertyConstant_ConstantValue()

addConstantValue

public void addConstantValue(PropertyValue newConstantValue)
phf: add element to multiplicity EList

Specified by:
addConstantValue in interface PropertyConstant
Parameters:
newConstantValue - the value to add to 'Constant Value' containment reference list.

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 java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

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

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

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

eUnset

public void eUnset(int featureID)

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

eIsSet

public boolean eIsSet(int featureID)

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

isList

public boolean isList()

Specified by:
isList in interface PropertyConstant
Specified by:
isList in interface ReferencedProperty
Returns:
the value of the 'List' attribute.
See Also:
PropertyConstant.setList(boolean), PropertyPackage.getPropertyConstant_List()

setList

public void setList(boolean newList)
phf: we want an add version for EList

Specified by:
setList in interface PropertyConstant
Parameters:
newList - the new value of the 'List' attribute.
See Also:
PropertyConstant.isList()

getPropertyTypeReference

public PropertyConstantType getPropertyTypeReference()

Specified by:
getPropertyTypeReference in interface PropertyConstant
Returns:
the value of the 'Property Type Reference' reference.
See Also:
PropertyConstant.setPropertyTypeReference(PropertyConstantType), PropertyPackage.getPropertyConstant_PropertyTypeReference()

basicGetPropertyTypeReference

public PropertyConstantType basicGetPropertyTypeReference()


setPropertyTypeReference

public void setPropertyTypeReference(PropertyConstantType newPropertyTypeReference)

Specified by:
setPropertyTypeReference in interface PropertyConstant
Parameters:
newPropertyTypeReference - the new value of the 'Property Type Reference' reference.
See Also:
PropertyConstant.getPropertyTypeReference()

getPropertyType

public PropertyConstantType getPropertyType()

Specified by:
getPropertyType in interface PropertyConstant
Returns:
the value of the 'Property Type' containment reference.
See Also:
PropertyConstant.setPropertyType(PropertyConstantType), PropertyPackage.getPropertyConstant_PropertyType()

basicSetPropertyType

public org.eclipse.emf.common.notify.NotificationChain basicSetPropertyType(PropertyConstantType newPropertyType,
                                                                            org.eclipse.emf.common.notify.NotificationChain msgs)


setPropertyType

public void setPropertyType(PropertyConstantType newPropertyType)

Specified by:
setPropertyType in interface PropertyConstant
Parameters:
newPropertyType - the new value of the 'Property Type' containment reference.
See Also:
PropertyConstant.getPropertyType()

toString

public java.lang.String toString()

Overrides:
toString in class NamedElementImpl

getQualifiedName

public java.lang.String getQualifiedName()
get the qualified property name

Specified by:
getQualifiedName in interface PropertyConstant
Returns:
String property name with the propertyset

evaluate

public final AadlPropertyValue evaluate(java.lang.String sign,
                                        java.util.Map modes,
                                        PropertyHolder context)
                                 throws InvalidModelException
Description copied from interface: ReferencedProperty
Evaluate a referenced property.

Specified by:
evaluate in interface ReferencedProperty
Parameters:
sign - the referenceSign value from the containing PropertyReference.
modes - The mode in which to look up the value; a mapping from component impls to modes
context - The context in which to look up any property value references.
Returns:
The evaluated property value: either null, a PropertyValue, or a list of PropertyValues. If the evaluation is trivial, then this will be the same as the receiver.
Throws:
InvalidModelException - Thrown if there is a problem with the model that prevents the prpoerty value from being evaluated.

preEvaluate

public final void preEvaluate(PropertyHolder context,
                              java.util.Set reqModeContexts)
Description copied from interface: ReferencedProperty
Pre-evaluate a property value to determine which ComponentImpls have modes that can affect the property value.

Specified by:
preEvaluate in interface ReferencedProperty
Parameters:
context - The context in which the property value is to be looked up.
reqModeContexts - The working set of component implementations whose modes affect the value of the property. This set is modified as a side-effect of this method.

setParsedPropertyReference

public void setParsedPropertyReference(ParsedPropertyReference ppr)
set parsed property reference

Specified by:
setParsedPropertyReference in interface PropertyConstant
Parameters:
ppr - parsed propertry reference object

getParsedPropertyReference

public ParsedPropertyReference getParsedPropertyReference()
get parsed property reference

Specified by:
getParsedPropertyReference in interface PropertyConstant
Returns:
ppr parsed propertry reference object

getThePropertyType

public PropertyType getThePropertyType()
returns the property type of a property constant. This will be either a named property type that is referenced or an unnamed property type that is contained

Specified by:
getThePropertyType in interface PropertyConstant
Specified by:
getThePropertyType in interface ReferencedProperty
Returns:
PropertyType

getPropertySet

public PropertySet getPropertySet()
Get the containing Property set.

Specified by:
getPropertySet in interface PropertyConstant
Returns:
PropertySet

getSignedConstantValue

public org.eclipse.emf.common.util.EList getSignedConstantValue(java.lang.String sign)
Description copied from interface: PropertyConstant
This is a very special purpose method: when it is known that the property constant is a non-list of numeric-type, that is the type of the property constant is aadlreal or aadlinteger, then this method applies the given sign to the single numeric value in the properyt constant and returns a new NumberValue that is the result. If the property constant has the wrong type or the sign is null, the result of this method is the samae as PropertyConstant.getConstantValue().

Specified by:
getSignedConstantValue in interface PropertyConstant
Parameters:
sign - The sign to apply to the value of the constant. May be null.
Returns:
See method description.