
public final class ConfigValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
private ConfigValidationErrors |
errors |
private Project |
project |
| Constructor and Description |
|---|
ConfigValidator(Project project)
Create an validator instance that is capable of checking the content of a configuration file.
|
| Modifier and Type | Method and Description |
|---|---|
private <T> T |
createObject(Class<T> clazz,
String name)
Create an object through reflection, to use this method to create a solver object
Solver solverObj = this. |
Project |
getValidatedProject()
If the project has been validated, i.e.
|
ConfigValidationErrors |
validate()
Validate the project.
|
private void |
validateModels()
Validate the Models section of the configuration file.
|
private Project project
private ConfigValidationErrors errors
public ConfigValidator(Project project)
project - the contents of the [read] configuration file. project.public ConfigValidationErrors validate()
private void validateModels()
public Project getValidatedProject()
private <T> T createObject(Class<T> clazz, String name)
Solver solverObj = this.createObject(Solver.class, "RungeKutta4");
T - the type of object to create.clazz - the class type of the object we will create.name - the name of the class that is to be instantiated.Copyright © 2015 University of Glasgow. All rights reserved.