Package de.hsh.graja.core
Class ModuleRunner
- java.lang.Object
-
- de.hsh.graja.core.ModuleRunner
-
- Direct Known Subclasses:
CheckstyleModuleRunner
,CompileModuleRunner
,HumanModuleRunner
,JunitModuleRunner
,PmdModuleRunner
public abstract class ModuleRunner extends Object
A ModuleRunner executes a module such as JUnit or PMD. It takes aModuleRunnerInput
object as input and creates aModuleRunnerResult
object as output. This as an abstract class that must be inherited by concrete implementations. For a detailed documentation of the role of module runners in the context of the grading process see javadocs of classGraja
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ModuleRunner(ModuleConfiguration moduleCfg)
Constructor storesModuleConfiguration
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ModuleConfiguration
getModuleConfiguration()
abstract ModuleRunnerResult
run(ModuleRunnerInput mri, Map<String,ModuleRunnerResult> previousModuleResults)
This method executes the module runner.
-
-
-
Constructor Detail
-
ModuleRunner
protected ModuleRunner(ModuleConfiguration moduleCfg)
Constructor storesModuleConfiguration
- Parameters:
moduleCfg
- the configuration of the module
-
-
Method Detail
-
getModuleConfiguration
public ModuleConfiguration getModuleConfiguration()
- Returns:
- the module configuration
-
run
public abstract ModuleRunnerResult run(ModuleRunnerInput mri, Map<String,ModuleRunnerResult> previousModuleResults)
This method executes the module runner. It must be implemented by subclasses.- Parameters:
mri
- the input data for the runnerpreviousModuleResults
- output of previous modules serves as input for this module- Returns:
- the result of the module execution
-
-