edu.ksu.cis.cadena.core.adapter
Interface CadenaAdapter

All Known Implementing Classes:
AbstractBaseKindAdapter, AbstractInstanceAdapter, AbstractKindAdapter, AbstractMetaKindAdapter, AbstractTypeAdapter, BaseCadenaAdapter, BooleanValueAdapter, CollectionTypeAdapter, CollectionValueAdapter, ComponentInstanceAdapter, ComponentKindAdapter, ComponentMetaKindAdapter, ComponentPortAdapter, ComponentTypeAdapter, ConnectorDeclarationAdapter, ConnectorKindAdapter, ConnectorMetaKindAdapter, DirectPropertyContainerAdapter, EnumMemberAdapter, EnumTypeAdapter, EnumValueAdapter, InstanceRoleAdapter, IntegerValueAdapter, InterfaceKindAdapter, InterfaceKindBindingAdapter, InterfaceMetaKindAdapter, InterfaceTypeAdapter, InterfaceTypeVariableAdapter, ModuleAdapter, OpenPropertyBindingAdapter, PortAdapter, PortBindingAdapter, PortPropertyContainerAdapter, PortSpecAdapter, PropertyAdapter, PropertyDeclarationAdapter, ScenarioAdapter, ScenarioInstanceAdapter, ScenarioPortAdapter, StringValueAdapter, StructTypeAdapter, StructTypeMemberAdapter, StructValueAdapter, StructValueMemberImplAdapter, StyleAdapter

public interface CadenaAdapter

All automatically attached model adapters need to implement this interface.

Author:
jesse

Method Summary
 void addAffectedReferrers(Notification notification, EObject notifyingObject, EStructuralFeature notifyingObjectFeature, java.util.Set<Triple<CadenaAdapter,EObject,EStructuralFeature>> referrers)
           Calculate the set of model objects whose well-formedness could be affected by a structural change to element.
 void checkNode(EObject node)
          Called when a complete check of the model is performed.
 void forwardReferenceChanged(Notification notification, EObject second, EStructuralFeature third)
           
 

Method Detail

checkNode

void checkNode(EObject node)
Called when a complete check of the model is performed. All checks that the adapter provides should be checked by this call.

Parameters:
node - The current node being checked.

addAffectedReferrers

void addAffectedReferrers(Notification notification,
                          EObject notifyingObject,
                          EStructuralFeature notifyingObjectFeature,
                          java.util.Set<Triple<CadenaAdapter,EObject,EStructuralFeature>> referrers)

Calculate the set of model objects whose well-formedness could be affected by a structural change to element.

In order to prevent infinite, circular call sequences, the protocol for adding a referrer should be as follows:

      Triple<CadenaAdapter, EObject, Integer> client = ...;
        
      if (!referrers.contains(client))
      {
          referrers.add(client);
         
          List<Adapter> adapters = client.second.eAdapters();
              
          for (Adapter a : adapters)
          {
              if (a instanceof CadenaAdapter)
              {
                  ((CadenaAdapter)a).addAffectedReferrers(
                      client.second,
                      a,
                      client.third);
              }
          }
      }
 

Parameters:
element - the model object which changes
featureID - the structural feature on element which changed; used to prune the set of objects returned

forwardReferenceChanged

void forwardReferenceChanged(Notification notification,
                             EObject second,
                             EStructuralFeature third)