UML Modeling Layer

com.ibm.xtools.uml.msl.internal.redefinition
Class MultiValueRedefinableStructuralFeature

java.lang.Object
  extended by com.ibm.xtools.uml.msl.internal.redefinition.MultiValueRedefinableStructuralFeature
All Implemented Interfaces:
RedefinableStructuralFeature
Direct Known Subclasses:
RedefStateMachineUtil.Regions

public abstract class MultiValueRedefinableStructuralFeature
extends Object
implements RedefinableStructuralFeature


Field Summary
protected  EStructuralFeature feature
           
 
Constructor Summary
protected MultiValueRedefinableStructuralFeature(EStructuralFeature feature)
           
 
Method Summary
 void absorbInheritedContent(Element redefining, Classifier newRootRedefContext, boolean absorbCollections, boolean absorbReferencees, Map replacements)
          Transfers content of redefined fragment to redefining fragment
 void absorbInheritedContentFromPredecessor(Element redefining, Map replacements)
          Transfers content of redefined fragment to redefining fragment
 void copyContent(Element source, Element target)
          Copy local and inherited content from source to target
 void copyLocalContent(Element source, Element target)
          copies local content from the source element to the target element
 EStructuralFeature getBasicFeature()
           
 Object getInheritedContent(Element fragment)
          Gets inherited content of the given CONTEXTUAL fragment
protected  List getLocalContent(Element fragment)
           
abstract  Object getValue(Element element, EObject contextHint)
           
 boolean isApplicable(Element element)
           
 void onExclude(RedefinableElement el)
          Removes content from the feature when the given fragment gets excluded
 void onRedefine(Element redefined, Element redefining)
          Sets the newly redefined fragment's feature in correct state
 void setValue(Element element, Object value)
          sets the value to the given CONTEXTUAL (local to its context) fragment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

feature

protected final EStructuralFeature feature
Constructor Detail

MultiValueRedefinableStructuralFeature

protected MultiValueRedefinableStructuralFeature(EStructuralFeature feature)
Method Detail

getValue

public abstract Object getValue(Element element,
                                EObject contextHint)
Specified by:
getValue in interface RedefinableStructuralFeature
Returns:
feature value for the given fragment

getBasicFeature

public EStructuralFeature getBasicFeature()
Specified by:
getBasicFeature in interface RedefinableStructuralFeature
Returns:
structural feature this one is based on

getLocalContent

protected List getLocalContent(Element fragment)

getInheritedContent

public Object getInheritedContent(Element fragment)
Description copied from interface: RedefinableStructuralFeature
Gets inherited content of the given CONTEXTUAL fragment

Specified by:
getInheritedContent in interface RedefinableStructuralFeature
Returns:

copyContent

public void copyContent(Element source,
                        Element target)
Description copied from interface: RedefinableStructuralFeature
Copy local and inherited content from source to target

Specified by:
copyContent in interface RedefinableStructuralFeature

absorbInheritedContent

public void absorbInheritedContent(Element redefining,
                                   Classifier newRootRedefContext,
                                   boolean absorbCollections,
                                   boolean absorbReferencees,
                                   Map replacements)
Description copied from interface: RedefinableStructuralFeature
Transfers content of redefined fragment to redefining fragment

Specified by:
absorbInheritedContent in interface RedefinableStructuralFeature

absorbInheritedContentFromPredecessor

public void absorbInheritedContentFromPredecessor(Element redefining,
                                                  Map replacements)
Description copied from interface: RedefinableStructuralFeature
Transfers content of redefined fragment to redefining fragment

Specified by:
absorbInheritedContentFromPredecessor in interface RedefinableStructuralFeature

isApplicable

public boolean isApplicable(Element element)
Specified by:
isApplicable in interface RedefinableStructuralFeature
Returns:
true if the element has this feature

onRedefine

public void onRedefine(Element redefined,
                       Element redefining)
Description copied from interface: RedefinableStructuralFeature
Sets the newly redefined fragment's feature in correct state

Specified by:
onRedefine in interface RedefinableStructuralFeature

onExclude

public void onExclude(RedefinableElement el)
Description copied from interface: RedefinableStructuralFeature
Removes content from the feature when the given fragment gets excluded

Specified by:
onExclude in interface RedefinableStructuralFeature

setValue

public void setValue(Element element,
                     Object value)
Description copied from interface: RedefinableStructuralFeature
sets the value to the given CONTEXTUAL (local to its context) fragment

Specified by:
setValue in interface RedefinableStructuralFeature

copyLocalContent

public void copyLocalContent(Element source,
                             Element target)
Description copied from interface: RedefinableStructuralFeature
copies local content from the source element to the target element

Specified by:
copyLocalContent in interface RedefinableStructuralFeature

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.