|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.modelmutator.mutation.Mutation org.eclipse.emf.emfstore.internal.modelmutator.mutation.StructuralFeatureMutation<M> org.eclipse.emf.emfstore.internal.modelmutator.mutation.ContainmentChangeMutation<ESMoveObjectMutation> org.eclipse.emf.emfstore.internal.modelmutator.mutation.MoveObjectMutation
public class MoveObjectMutation
A mutation, which moves an object from one container into another.
Constructor Summary | |
---|---|
MoveObjectMutation(ESModelMutatorUtil util)
Creates a new mutation with the specified util . |
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. |
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. |
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 |
---|
public MoveObjectMutation(ESModelMutatorUtil util)
util
.
util
- The model mutator util used for accessing the model to be mutated.Method Detail |
---|
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 ESMoveObjectMutation
sourceObject
- the source object to be moved from.
ESMoveObjectMutation.setSourceObject(org.eclipse.emf.ecore.EObject)
public org.eclipse.emf.ecore.EObject getSourceObject()
getSourceObject
in interface ESMoveObjectMutation
ESMoveObjectMutation.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 ESMoveObjectMutation
sourceFeature
- 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 ESMoveObjectMutation
eObjectToMove
- the object to be moved
ESMoveObjectMutation.setEObjectToMove(org.eclipse.emf.ecore.EObject)
public org.eclipse.emf.ecore.EObject getEObjectToMove()
EObject
that will be or has been moved.
getEObjectToMove
in interface ESMoveObjectMutation
ESMoveObjectMutation.getEObjectToMove()
public Mutation clone()
clone
in class Mutation
Mutation.clone()
public void apply() throws ESMutationException
apply
in interface ESMutation
apply
in class Mutation
ESMutationException
- thrown if the mutation failed.Mutation.apply()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |