org.eclipse.emf.emfstore.internal.modelmutator.mutation
Class StructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.modelmutator.mutation.Mutation
      extended by org.eclipse.emf.emfstore.internal.modelmutator.mutation.StructuralFeatureMutation<M>
Type Parameters:
M - the implementing API mutation type
All Implemented Interfaces:
Cloneable, ESMutation, ESStructuralFeatureMutation<M>
Direct Known Subclasses:
AttributeChangeMutation, ContainmentChangeMutation, FeatureMapKeyMutation, FeatureMapValueMutation, ReferenceChangeMutation

public abstract class StructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
extends Mutation
implements ESStructuralFeatureMutation<M>

An abstract mutation for changing structural feature values.

Author:
Philip Langer

Constructor Summary
StructuralFeatureMutation(ESModelMutatorUtil util)
          Creates a new mutation with the specified util.
 
Method Summary
 Collection<org.eclipse.emf.ecore.EClass> getExcludedTargetEClasses()
          Returns the collection of EClasses to be excluded when selecting the target object.
 Collection<org.eclipse.emf.ecore.EStructuralFeature> getExcludedTargetFeatures()
          Returns the collection of features to be excluded from being selected as the target feature.
 Collection<org.eclipse.emf.ecore.EObject> getExcludedTargetObjects()
          Returns the collection of EObjects to be excluded from being selected as the target object.
 org.eclipse.emf.ecore.EStructuralFeature getTargetFeature()
          Returns the EStructuralFeature of a target object that will or has been mutated.
 org.eclipse.emf.ecore.EObject getTargetObject()
          Returns the selected or set target object that will or has been mutated.
 M setTargetFeature(org.eclipse.emf.ecore.EStructuralFeature targetFeature)
          Sets the EStructuralFeature of a target object that will be mutated.
 M setTargetObject(org.eclipse.emf.ecore.EObject targetObject)
          Sets the EObject to be used as target object.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.modelmutator.mutation.Mutation
apply, clone
 
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.ESMutation
apply
 

Constructor Detail

StructuralFeatureMutation

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

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

getExcludedTargetEClasses

public Collection<org.eclipse.emf.ecore.EClass> getExcludedTargetEClasses()
Returns the collection of EClasses to be excluded when selecting the target object.

That is, EObjects are excluded from being selected as target object if they are an instance of an EClass contained in this collection. The returned collection is changeable. Add items using getExcludedTargetEClasses().add.

Specified by:
getExcludedTargetEClasses in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Returns:
the collection of excluded EClasses
See Also:
ESStructuralFeatureMutation.getExcludedTargetEClasses()

getExcludedTargetFeatures

public Collection<org.eclipse.emf.ecore.EStructuralFeature> getExcludedTargetFeatures()
Returns the collection of features to be excluded from being selected as the target feature.

The returned collection is changeable. Add items using getExcludedTargetFeatures().add.

Specified by:
getExcludedTargetFeatures in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Returns:
the collection of excluded features
See Also:
ESStructuralFeatureMutation.getExcludedTargetFeatures()

getExcludedTargetObjects

public Collection<org.eclipse.emf.ecore.EObject> getExcludedTargetObjects()
Returns the collection of EObjects to be excluded from being selected as the target object.

The returned collection is changeable. Add items using getExcludedTargetObjects().add.

Specified by:
getExcludedTargetObjects in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Returns:
the collection of EObjects
See Also:
ESStructuralFeatureMutation.getExcludedTargetObjects()

setTargetObject

public M setTargetObject(org.eclipse.emf.ecore.EObject targetObject)
Sets the EObject to be used as target object.

Specified by:
setTargetObject in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Parameters:
targetObject - the target object to be mutated
Returns:
this mutation
See Also:
ESStructuralFeatureMutation.setTargetObject(org.eclipse.emf.ecore.EObject)

getTargetObject

public org.eclipse.emf.ecore.EObject getTargetObject()
Returns the selected or set target object that will or has been mutated.

Specified by:
getTargetObject in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Returns:
the target object
See Also:
ESStructuralFeatureMutation.getTargetObject()

setTargetFeature

public M setTargetFeature(org.eclipse.emf.ecore.EStructuralFeature targetFeature)
Sets the EStructuralFeature of a target object that will be mutated.

Specified by:
setTargetFeature in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Parameters:
targetFeature - the feature of the target object to be mutated
Returns:
this mutation
See Also:
ESStructuralFeatureMutation.setTargetFeature(org.eclipse.emf.ecore.EStructuralFeature)

getTargetFeature

public org.eclipse.emf.ecore.EStructuralFeature getTargetFeature()
Returns the EStructuralFeature of a target object that will or has been mutated.

Specified by:
getTargetFeature in interface ESStructuralFeatureMutation<M extends ESStructuralFeatureMutation<?>>
Returns:
the target feature
See Also:
ESStructuralFeatureMutation.getTargetFeature()


Copyright © 2015. All Rights Reserved.