Class DefaultExtensionExecutor
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.process.extension.DefaultExtensionExecutor
-
- All Implemented Interfaces:
ExtensionExecutor
public class DefaultExtensionExecutor extends Object implements ExtensionExecutor
The defaultExtensionExecutor, that manages the execution of all known Extensions.Ensures wrapping behavior for extensions. I.e., assume callback A and callback B both implement the callback before and after an entity. If callback A gets registered before callback B, wrapping behavior would ensure, that its behavior before the entity is always executed before the corresponding behavior of callback B and its behavior after the entity is always executed after the corresponding behavior of callback B.
-
-
Constructor Summary
Constructors Constructor Description DefaultExtensionExecutor(Collection<? extends Extension> extensions)Creates a new executor with the given extensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Combination,TestResult>executeAfterExecution(Map<Combination,TestResult> executionResultMap)Executes the callback after the execution phasevoidexecuteAfterFaultCharacterization(List<Combination> combinations)Executes the callback after the fault characterization phaseList<Combination>executeAfterGeneration(List<Combination> combinations)Executes the callback after the generation phasevoidexecuteBeforeExecution(List<Combination> combinations)Executes the callback before the execution phasevoidexecuteBeforeFaultCharacterization(Map<Combination,TestResult> combinationTestResultMap)Executes the callback before the fault characterization phasevoidexecuteBeforeGeneration()Executes the callback before the initial generationInputParameterModelexecuteModelModifiers(InputParameterModel original, ExecutionReporter reporter)Executes all registeredModelModifierexactly in the order they were registered in.
-
-
-
Constructor Detail
-
DefaultExtensionExecutor
public DefaultExtensionExecutor(Collection<? extends Extension> extensions)
Creates a new executor with the given extensions.- Parameters:
extensions- the list of Extensions to be managed- Throws:
Coffee4JException- if not all Extensions types are known by this Executor
-
-
Method Detail
-
executeModelModifiers
public InputParameterModel executeModelModifiers(InputParameterModel original, ExecutionReporter reporter)
Description copied from interface:ExtensionExecutorExecutes all registeredModelModifierexactly in the order they were registered in.- Specified by:
executeModelModifiersin interfaceExtensionExecutor- Parameters:
original- the originalInputParameterModelas given by the userreporter- for reporting any changes to the original model- Returns:
- an
InputParameterModelmodified by all registered processors
-
executeBeforeGeneration
public void executeBeforeGeneration()
Description copied from interface:ExtensionExecutorExecutes the callback before the initial generation- Specified by:
executeBeforeGenerationin interfaceExtensionExecutor
-
executeAfterGeneration
public List<Combination> executeAfterGeneration(List<Combination> combinations)
Executes the callback after the generation phase- Specified by:
executeAfterGenerationin interfaceExtensionExecutor- Parameters:
combinations- the list of combinations generated in the generation phase- Returns:
- the possibly sorted combinations
- Throws:
Coffee4JException- if the items of the input and output list do not match
-
executeBeforeExecution
public void executeBeforeExecution(List<Combination> combinations)
Description copied from interface:ExtensionExecutorExecutes the callback before the execution phase- Specified by:
executeBeforeExecutionin interfaceExtensionExecutor- Parameters:
combinations- the sorted combinations from the generation phase
-
executeAfterExecution
public Map<Combination,TestResult> executeAfterExecution(Map<Combination,TestResult> executionResultMap)
Executes the callback after the execution phase- Specified by:
executeAfterExecutionin interfaceExtensionExecutor- Parameters:
executionResultMap- the preliminary test results from the execution phase- Returns:
- the possibly altered execution results
- Throws:
Coffee4JException- if a callback returned null or a callback modified the combinations or executors
-
executeBeforeFaultCharacterization
public void executeBeforeFaultCharacterization(Map<Combination,TestResult> combinationTestResultMap)
Description copied from interface:ExtensionExecutorExecutes the callback before the fault characterization phase- Specified by:
executeBeforeFaultCharacterizationin interfaceExtensionExecutor- Parameters:
combinationTestResultMap- the summarized test results of the combinations
-
executeAfterFaultCharacterization
public void executeAfterFaultCharacterization(List<Combination> combinations)
Description copied from interface:ExtensionExecutorExecutes the callback after the fault characterization phase- Specified by:
executeAfterFaultCharacterizationin interfaceExtensionExecutor- Parameters:
combinations- the combinations generated in the fault characterization phase
-
-