public class DeleteObjectMutation extends ContainmentChangeMutation<ESDeleteObjectMutation> implements ESDeleteObjectMutation
| Constructor and Description |
|---|
DeleteObjectMutation(ESModelMutatorUtil util)
Creates a new mutation with the specified
util. |
DeleteObjectMutation(ESModelMutatorUtil util,
MutationTargetSelector selector)
Creates a new mutation with the specified
util and the selector. |
| 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 |
getEObjectToDelete()
Returns the object deleted or to be deleted by this mutation.
|
int |
getMaxNumberOfContainments()
Returns the maximum number of containments that the object selected for deletion may contain.
|
void |
setEObjectToDelete(org.eclipse.emf.ecore.EObject eObjectToDelete)
Sets the object to be deleted by this mutation.
|
DeleteObjectMutation |
setMaxNumberOfContainments(int maxNumberOfContainments)
Sets the maximum number of containments that the object selected for deletion may contain.
|
getExcludedTargetEClasses, getExcludedTargetFeatures, getExcludedTargetObjects, getTargetFeature, getTargetObject, setTargetFeature, setTargetObjectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExcludedTargetEClasses, getExcludedTargetFeatures, getExcludedTargetObjects, getTargetFeature, getTargetObject, setTargetFeature, setTargetObjectpublic DeleteObjectMutation(ESModelMutatorUtil util)
util.util - The model mutator util used for accessing the model to be mutated.public DeleteObjectMutation(ESModelMutatorUtil util, MutationTargetSelector selector)
util and the selector.util - The model mutator util used for accessing the model to be mutated.selector - The target selector for selecting the target container and feature.public DeleteObjectMutation setMaxNumberOfContainments(int maxNumberOfContainments)
setMaxNumberOfContainments in interface ESDeleteObjectMutationmaxNumberOfContainments - the maximum number of containments of the object to be deleted.ESDeleteObjectMutation.setMaxNumberOfContainments(int)public int getMaxNumberOfContainments()
public void setEObjectToDelete(org.eclipse.emf.ecore.EObject eObjectToDelete)
eObjectToDelete - The object to be deleted.public org.eclipse.emf.ecore.EObject getEObjectToDelete()
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.