public class MoveObjectMutation extends ContainmentChangeMutation<ESMoveObjectMutation> implements ESMoveObjectMutation
| Constructor and Description |
|---|
MoveObjectMutation(ESModelMutatorUtil util)
Creates a new mutation with the specified
util. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
org.eclipse.emf.ecore.EObject |
getEObjectToMove()
Returns the
EObject that will be or has been moved. |
Collection<org.eclipse.emf.ecore.EClass> |
getExcludedSourceEClasses()
Returns the collection of
EClasses to be excluded when selecting the source object from which
this mutation will move an object. |
Collection<org.eclipse.emf.ecore.EStructuralFeature> |
getExcludedSourceFeatures()
Returns the collection of
features to be excluded from being selected as the source
object's containment feature from which this mutation will move an object. |
Collection<org.eclipse.emf.ecore.EObject> |
getExcludedSourceObjects()
Returns the collection of
EObjects to be excluded from being selected as the source object
from which this mutation will move an object. |
org.eclipse.emf.ecore.EStructuralFeature |
getSourceFeature()
Returns the
EStructuralFeature of a source object from which this mutation will move or moved an
object. |
org.eclipse.emf.ecore.EObject |
getSourceObject()
Returns the selected or set source object from which this mutation will move or moved an object.
|
ESMoveObjectMutation |
setEObjectToMove(org.eclipse.emf.ecore.EObject eObjectToMove)
Sets the
EObject to be moved. |
ESMoveObjectMutation |
setSourceFeature(org.eclipse.emf.ecore.EStructuralFeature sourceFeature)
Sets the
EStructuralFeature of a source object from which this mutation will move or moved an object. |
ESMoveObjectMutation |
setSourceObject(org.eclipse.emf.ecore.EObject sourceObject)
Sets the
EObject to be used as source object from which this mutation will move an object. |
getExcludedTargetEClasses, getExcludedTargetFeatures, getExcludedTargetObjects, getTargetFeature, getTargetObject, setTargetFeature, setTargetObjectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExcludedTargetEClasses, getExcludedTargetFeatures, getExcludedTargetObjects, getTargetFeature, getTargetObject, setTargetFeature, setTargetObjectpublic MoveObjectMutation(ESModelMutatorUtil util)
util.util - The model mutator util used for accessing the model to be mutated.public Collection<org.eclipse.emf.ecore.EClass> getExcludedSourceEClasses()
EClasses to be excluded when selecting the source object from which
this mutation will move an object.
That is, EObjects are excluded from being selected as source object if they are an instance of an EClass
contained in this collection. The returned collection is changeable. Add items using
getExcludedSourceEClasses().add.
public Collection<org.eclipse.emf.ecore.EStructuralFeature> getExcludedSourceFeatures()
features to be excluded from being selected as the source
object's containment feature from which this mutation will move an object.
The returned collection is changeable. Add items using getExcludedSourceFeatures().add.
public Collection<org.eclipse.emf.ecore.EObject> getExcludedSourceObjects()
EObjects to be excluded from being selected as the source object
from which this mutation will move an object.
The returned collection is changeable. Add items using getExcludedSourceObjects().add.
public ESMoveObjectMutation setSourceObject(org.eclipse.emf.ecore.EObject sourceObject)
EObject to be used as source object from which this mutation will move an object.setSourceObject in interface ESMoveObjectMutationsourceObject - the source object to be moved from.ESMoveObjectMutation.setSourceObject(org.eclipse.emf.ecore.EObject)public org.eclipse.emf.ecore.EObject getSourceObject()
getSourceObject in interface ESMoveObjectMutationESMoveObjectMutation.getSourceObject()public ESMoveObjectMutation setSourceFeature(org.eclipse.emf.ecore.EStructuralFeature sourceFeature)
EStructuralFeature of a source object from which this mutation will move or moved an object.setSourceFeature in interface ESMoveObjectMutationsourceFeature - The feature of the source object through which the moved or to-be-moved object was or is
contained.ESMoveObjectMutation.setSourceFeature(org.eclipse.emf.ecore.EStructuralFeature)public org.eclipse.emf.ecore.EStructuralFeature getSourceFeature()
EStructuralFeature of a source object from which this mutation will move or moved an
object.public ESMoveObjectMutation setEObjectToMove(org.eclipse.emf.ecore.EObject eObjectToMove)
EObject to be moved.setEObjectToMove in interface ESMoveObjectMutationeObjectToMove - the object to be movedESMoveObjectMutation.setEObjectToMove(org.eclipse.emf.ecore.EObject)public org.eclipse.emf.ecore.EObject getEObjectToMove()
EObject that will be or has been moved.getEObjectToMove in interface ESMoveObjectMutationESMoveObjectMutation.getEObjectToMove()public Mutation clone()
clone in class MutationMutation.clone()public void apply()
throws ESMutationException
apply in interface ESMutationapply in class MutationESMutationException - thrown if the mutation failed.Mutation.apply()Copyright © 2017. All rights reserved.