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

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.modelmutator.mutation.Mutation
All Implemented Interfaces:
Cloneable, ESMutation
Direct Known Subclasses:
StructuralFeatureMutation

public abstract class Mutation
extends Object
implements Cloneable, ESMutation

Abstract mutation acting as a common super class of specific implementations of mutations.

Author:
Philip Langer

Method Summary
abstract  void apply()
          Applies this mutation and returns whether it succeeded in being applied.
abstract  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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clone

public abstract 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.

Overrides:
clone in class Object
Returns:
A copy of this mutation with the same configuration.
See Also:
Object.clone()

apply

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

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


Copyright © 2015. All Rights Reserved.