Class 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 derived EStructuralFeatures. 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter

        org.eclipse.emf.common.notify.Adapter.Internal
    • Field Summary

      • Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl

        target
    • 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 same EObject 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)  
      • Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl

        getTarget, isAdapterForType, setTarget, unsetTarget
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DerivedAttributeAdapter

        public DerivedAttributeAdapter​(org.eclipse.emf.ecore.EObject source,
                                       org.eclipse.emf.ecore.EStructuralFeature derivedFeature)
        Parameters:
        source - the owner of the derived feature
        derivedFeature - the derived feature
    • 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 same EObject 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 path
        navigationFeatures - the reference path. This must NOT be empty
      • notifyChanged

        public void notifyChanged​(org.eclipse.emf.common.notify.Notification notification)
        Specified by:
        notifyChanged in interface org.eclipse.emf.common.notify.Adapter
        Overrides:
        notifyChanged in class org.eclipse.emf.common.notify.impl.AdapterImpl