Package org.eclipse.emf.ecp.common.spi
Class DerivedAttributeAdapter
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.AdapterImpl
-
- org.eclipse.emf.ecp.common.spi.DerivedAttributeAdapter
-
- All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter
,org.eclipse.emf.common.notify.Adapter.Internal
public class DerivedAttributeAdapter extends org.eclipse.emf.common.notify.impl.AdapterImpl
The DerivedAttributeAdapter can be added on EObjects which include derivedEStructuralFeatures
. This Adapter will make sure that correct SET/UNSET notifications are issued when a feature from which the derived feature is derived from changes.- Since:
- 1.8
- Author:
- Johannes Faltermeier
-
-
Constructor Summary
Constructors Constructor Description DerivedAttributeAdapter(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature derivedFeature)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLocalDependency(org.eclipse.emf.ecore.EStructuralFeature localFeature)
Use this method to indicate that the given feature influences the derived value and is owned by the sameEObject
as the derived feature.void
addNavigatedDependency(org.eclipse.emf.ecore.EStructuralFeature dependentFeature, org.eclipse.emf.ecore.EReference... navigationFeatures)
Use this method to indicate the given given feature path influences the derived value.void
notifyChanged(org.eclipse.emf.common.notify.Notification notification)
-
-
-
Method Detail
-
addLocalDependency
public void addLocalDependency(org.eclipse.emf.ecore.EStructuralFeature localFeature)
Use this method to indicate that the given feature influences the derived value and is owned by the sameEObject
as the derived feature.- Parameters:
localFeature
- the local feature.
-
addNavigatedDependency
public void addNavigatedDependency(org.eclipse.emf.ecore.EStructuralFeature dependentFeature, org.eclipse.emf.ecore.EReference... navigationFeatures)
Use this method to indicate the given given feature path influences the derived value.- Parameters:
dependentFeature
- the last feature on the pathnavigationFeatures
- the reference path. This must NOT be empty
-
notifyChanged
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
notifyChanged
in interfaceorg.eclipse.emf.common.notify.Adapter
- Overrides:
notifyChanged
in classorg.eclipse.emf.common.notify.impl.AdapterImpl
-
-