MATSIM
core
config
consistency
UnmaterializedConfigGroupChecker.java
Go to the documentation of this file.
1
2
/* *********************************************************************** *
3
* project: org.matsim.*
4
* UnmaterializedConfigGroupChecker.java
5
* *
6
* *********************************************************************** *
7
* *
8
* copyright : (C) 2019 by the members listed in the COPYING, *
9
* LICENSE and WARRANTY file. *
10
* email : info at matsim dot org *
11
* *
12
* *********************************************************************** *
13
* *
14
* This program is free software; you can redistribute it and/or modify *
15
* it under the terms of the GNU General Public License as published by *
16
* the Free Software Foundation; either version 2 of the License, or *
17
* (at your option) any later version. *
18
* See also COPYING, LICENSE and WARRANTY file *
19
* *
20
* *********************************************************************** */
21
22
package
org.matsim.core.config.consistency;
23
24
import
org
.apache.logging.log4j.LogManager;
25
import
org
.apache.logging.log4j.Logger;
26
import
org
.
matsim
.
core
.
config
.
Config
;
27
import
org
.
matsim
.
core
.
config
.
ConfigGroup
;
28
29
public
class
UnmaterializedConfigGroupChecker
implements
ConfigConsistencyChecker
{
30
31
private
final
static
Logger
LOG
= LogManager.getLogger(
UnmaterializedConfigGroupChecker
.class);
32
33
@Override
34
public
void
checkConsistency
(
Config
config) {
35
for
(
ConfigGroup
configGroup : config.
getModules
().values()) {
36
if
(configGroup.getClass().equals(
ConfigGroup
.class)) {
37
if
(configGroup.getName().equals(
"jdeqsim"
)) {
38
LOG.warn(
"jdeqsim is no longer supported. Please remove the jdeqsim module from your config."
);
39
}
else
{
40
throw
new
RuntimeException
(
"Unmaterialized config group: "
+configGroup.getName());
41
}
42
}
43
}
44
}
45
}
org.matsim.core.config.consistency.ConfigConsistencyChecker
Definition:
ConfigConsistencyChecker.java:35
org.matsim.core.config.consistency.UnmaterializedConfigGroupChecker.checkConsistency
void checkConsistency(Config config)
Definition:
UnmaterializedConfigGroupChecker.java:34
org.matsim.core.config.consistency.UnmaterializedConfigGroupChecker.LOG
static final Logger LOG
Definition:
UnmaterializedConfigGroupChecker.java:31
org
org.matsim.core.config.consistency.UnmaterializedConfigGroupChecker
Definition:
UnmaterializedConfigGroupChecker.java:29
org.matsim.core.config.ConfigGroup
Definition:
ConfigGroup.java:45
org.matsim.core.config.Config
Definition:
Config.java:73
org.matsim.core.config
Definition:
CommandLine.java:22
RuntimeException
org.matsim.core
org.matsim
org.matsim.core.config.Config.getModules
final TreeMap< String, ConfigGroup > getModules()
Definition:
Config.java:288
Generated by
1.8.13