org.eclipse.emf.emfstore.internal.modelmutator.mutation
Class FeatureMapKeyMutation

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.modelmutator.mutation.Mutation
      extended by org.eclipse.emf.emfstore.internal.modelmutator.mutation.StructuralFeatureMutation<ESFeatureMapKeyMutation>
          extended by org.eclipse.emf.emfstore.internal.modelmutator.mutation.FeatureMapKeyMutation
All Implemented Interfaces:
Cloneable, ESFeatureMapKeyMutation, ESMutation, ESStructuralFeatureMutation<ESFeatureMapKeyMutation>

public class FeatureMapKeyMutation
extends StructuralFeatureMutation<ESFeatureMapKeyMutation>
implements ESFeatureMapKeyMutation

A mutation, which changes the keys of feature map entries.

Author:
Philip Langer

Constructor Summary
FeatureMapKeyMutation(ESModelMutatorUtil util)
          Creates a new mutation with the specified util.
FeatureMapKeyMutation(ESModelMutatorUtil util, MutationTargetSelector selector)
          Creates a new mutation with the specified util and the selector.
 
Method Summary
 void apply()
          Applies this mutation and returns whether it succeeded in being applied.
 Mutation clone()
          Mutations must follow the prototype pattern as org.eclipse.emf.emfstore.internal.modelmutator.api.ModelMutator will clone pre-configured mutations before they will be completed and applied.
 List<org.eclipse.emf.ecore.EStructuralFeature> getFeaturesOfFeatureMapGroup()
          Returns the features that are derived from the selected feature map.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.modelmutator.mutation.StructuralFeatureMutation
getExcludedTargetEClasses, getExcludedTargetFeatures, getExcludedTargetObjects, getTargetFeature, getTargetObject, setTargetFeature, setTargetObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.emfstore.modelmutator.ESStructuralFeatureMutation
getExcludedTargetEClasses, getExcludedTargetFeatures, getExcludedTargetObjects, getTargetFeature, getTargetObject, setTargetFeature, setTargetObject
 

Constructor Detail

FeatureMapKeyMutation

public FeatureMapKeyMutation(ESModelMutatorUtil util)
Creates a new mutation with the specified util.

Parameters:
util - The model mutator util used for accessing the model to be mutated.

FeatureMapKeyMutation

public FeatureMapKeyMutation(ESModelMutatorUtil util,
                             MutationTargetSelector selector)
Creates a new mutation with the specified util and the selector.

Parameters:
util - The model mutator util used for accessing the model to be mutated.
selector - The target selector for selecting the target container and feature.
Method Detail

clone

public Mutation clone()
Mutations must follow the prototype pattern as org.eclipse.emf.emfstore.internal.modelmutator.api.ModelMutator will clone pre-configured mutations before they will be completed and applied. This allows clients to provide a specifically configured set mutations and start the mutation only from cloning and applying the set of pre-configured mutations.

Specified by:
clone in class Mutation
Returns:
A copy of this mutation with the same configuration.
See Also:
Mutation.clone()

apply

public void apply()
           throws ESMutationException
Applies this mutation and returns whether it succeeded in being applied.

Specified by:
apply in interface ESMutation
Specified by:
apply in class Mutation
Throws:
ESMutationException - thrown if the mutation failed.
See Also:
Mutation.apply()

getFeaturesOfFeatureMapGroup

public List<org.eclipse.emf.ecore.EStructuralFeature> getFeaturesOfFeatureMapGroup()
Returns the features that are derived from the selected feature map.

Returns:
The features of the selected feature map.


Copyright © 2015. All Rights Reserved.