org.eclipse.emf.emfstore.internal.fuzzy.emf.api
Class ESMutatorConfigImpl

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.common.api.AbstractAPIImpl<ESMutatorConfigImpl,MutatorConfig>
      extended by org.eclipse.emf.emfstore.internal.fuzzy.emf.api.ESMutatorConfigImpl
All Implemented Interfaces:
ESMutatorConfig, InternalAPIDelegator<ESMutatorConfigImpl,MutatorConfig>

public class ESMutatorConfigImpl
extends AbstractAPIImpl<ESMutatorConfigImpl,MutatorConfig>
implements ESMutatorConfig

The API implementation wrapper for MutatorConfig.

Author:
emueller

Constructor Summary
ESMutatorConfigImpl(MutatorConfig mutatorConfig)
          Constructor.
 
Method Summary
 Collection<org.eclipse.emf.ecore.EClass> getEClassesToIgnore()
          Returns a collection of EClasses to be ignored during object generation.
 Collection<org.eclipse.emf.ecore.EPackage> getEPackages()
          The EPackages to used during object generation.
 Collection<org.eclipse.emf.ecore.EStructuralFeature> getEStructuralFeaturesToIgnore()
          Returns a collection of EStructuralFeatures to be ignored during object mutation.
 Integer getMaxDeleteCount()
          Specifies how many objects should be deleted at most? Only applies to mutation.
 int getMinObjectsCount()
          Defines how many objects should be generated.
 int getMutationCount()
          Specifies the exact number of mutations to be performed.
 org.eclipse.emf.ecore.EClass getRootEClass()
          The EClass of the root.
 boolean isAllowDuplicateIDs()
          Whether it is allowed to generate duplicate IDs.
 boolean isDoNotGenerateRoot()
          Whether the mutator should generate objects at the root level.
 boolean isIgnoreAndLog()
          Determines whether the mutator should ignore and log exception or whether it should fail with an exception.
 boolean isUseEcoreUtilDelete()
          Whether delete mutations should use EcoreUtil#delete.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.common.api.AbstractAPIImpl
equals, hashCode, toInternalAPI
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESMutatorConfigImpl

public ESMutatorConfigImpl(MutatorConfig mutatorConfig)
Constructor.

Parameters:
mutatorConfig - the internal MutatorConfig instance to be wrapped
Method Detail

getRootEClass

public org.eclipse.emf.ecore.EClass getRootEClass()
The EClass of the root.

Specified by:
getRootEClass in interface ESMutatorConfig
Returns:
EClass of the root
See Also:
ESMutatorConfig.getRootEClass()

getMinObjectsCount

public int getMinObjectsCount()
Defines how many objects should be generated.

Specified by:
getMinObjectsCount in interface ESMutatorConfig
Returns:
the number of objects to be generated
See Also:
ESMutatorConfig.getMinObjectsCount()

isDoNotGenerateRoot

public boolean isDoNotGenerateRoot()
Whether the mutator should generate objects at the root level.

Specified by:
isDoNotGenerateRoot in interface ESMutatorConfig
Returns:
true, if the mutator should generate objects on the root level, false otherwise
See Also:
ESMutatorConfig.isDoNotGenerateRoot()

getEClassesToIgnore

public Collection<org.eclipse.emf.ecore.EClass> getEClassesToIgnore()
Returns a collection of EClasses to be ignored during object generation.

Specified by:
getEClassesToIgnore in interface ESMutatorConfig
Returns:
a collection of EClasses that are ignored during object generation
See Also:
ESMutatorConfig.getEClassesToIgnore()

getEStructuralFeaturesToIgnore

public Collection<org.eclipse.emf.ecore.EStructuralFeature> getEStructuralFeaturesToIgnore()
Returns a collection of EStructuralFeatures to be ignored during object mutation.

Specified by:
getEStructuralFeaturesToIgnore in interface ESMutatorConfig
Returns:
a collection of EStructuralFeatures that are ignored during object generation
See Also:
ESMutatorConfig.getEStructuralFeaturesToIgnore()

isIgnoreAndLog

public boolean isIgnoreAndLog()
Determines whether the mutator should ignore and log exception or whether it should fail with an exception.

Specified by:
isIgnoreAndLog in interface ESMutatorConfig
Returns:
true, if exceptions should only be logged, false otherwise
See Also:
ESMutatorConfig.isIgnoreAndLog()

isUseEcoreUtilDelete

public boolean isUseEcoreUtilDelete()
Whether delete mutations should use EcoreUtil#delete. Note that if this is set to true, that might lead to bad performance with bigger models.

Specified by:
isUseEcoreUtilDelete in interface ESMutatorConfig
Returns:
true, if EcoreUtil#delete should be used to perform delete mutation, false otherwise
See Also:
ESMutatorConfig.isUseEcoreUtilDelete()

getMaxDeleteCount

public Integer getMaxDeleteCount()
Specifies how many objects should be deleted at most? Only applies to mutation.

Specified by:
getMaxDeleteCount in interface ESMutatorConfig
Returns:
the number of objects that should be deleted at most
See Also:
ESMutatorConfig.getMaxDeleteCount()

getEPackages

public Collection<org.eclipse.emf.ecore.EPackage> getEPackages()
The EPackages to used during object generation. Only EClasses contained in these packages are considered to used for instantiating objects.

Specified by:
getEPackages in interface ESMutatorConfig
Returns:
a collection of EClasses that is considered during object generation
See Also:
ESMutatorConfig.getEPackages()

isAllowDuplicateIDs

public boolean isAllowDuplicateIDs()
Whether it is allowed to generate duplicate IDs.

Specified by:
isAllowDuplicateIDs in interface ESMutatorConfig
Returns:
true, if duplicate IDs should be allowed, false otherwise
See Also:
ESMutatorConfig.isAllowDuplicateIDs()

getMutationCount

public int getMutationCount()
Specifies the exact number of mutations to be performed. Only applies to the mutation case.

Specified by:
getMutationCount in interface ESMutatorConfig
Returns:
the exact number of mutations to be performed
See Also:
ESMutatorConfig.getMutationCount()


Copyright © 2015. All Rights Reserved.