// Path: src/main/java/com/adeptj/runtime/common/Environment.java
// public final class Environment {
// 
//     /**
//      * Deny direct instantiation.
//      */
//     private Environment() {
//     }
// 
//     public static boolean isDev() {
//         return ServerMode.DEV.toString().equalsIgnoreCase(System.getProperty(SYS_PROP_SERVER_MODE));
//     }
// 
//     public static Path getServerConfPath() {
//         return Paths.get(USER_DIR, DIR_ADEPTJ_RUNTIME, DIR_DEPLOYMENT, SERVER_CONF_FILE);
//     }
// 
//     public static Path getFrameworkConfPath() {
//         return Paths.get(USER_DIR, DIR_ADEPTJ_RUNTIME, DIR_DEPLOYMENT, FRAMEWORK_CONF_FILE);
//     }
// }
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String COMMON_CONF_SECTION = "common";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String FELIX_CONF_SECTION = "felix";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String LOGGING_CONF_SECTION = "logging";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String MAIN_CONF_SECTION = "main";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String RESTEASY_CONF_SECTION = "resteasy";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String SERVER_CONF_FILE = "server.conf";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String SYS_PROP_OVERWRITE_SERVER_CONF = "overwrite.server.conf.file";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String TRIMOU_CONF_SECTION = "trimou";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String UNDERTOW_CONF_SECTION = "undertow";


import static com.adeptj.runtime.common.Constants.RESTEASY_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.SERVER_CONF_FILE;
import static com.adeptj.runtime.common.Constants.SYS_PROP_OVERWRITE_SERVER_CONF;
import static com.adeptj.runtime.common.Constants.TRIMOU_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.UNDERTOW_CONF_SECTION;
import com.adeptj.runtime.common.Environment;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import java.io.File;
import static com.adeptj.runtime.common.Constants.COMMON_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.FELIX_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.LOGGING_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.MAIN_CONF_SECTION;
        return this.root.getConfig(MAIN_CONF_SECTION);
    }

    public Config undertow() {
        return this.main().getConfig(UNDERTOW_CONF_SECTION);
    }

    public Config felix() {
        return this.main().getConfig(FELIX_CONF_SECTION);
    }

    public Config common() {
        return this.main().getConfig(COMMON_CONF_SECTION);
    }

    public Config logging() {
        return this.main().getConfig(LOGGING_CONF_SECTION);
    }

    public Config trimou() {
        return this.main().getConfig(TRIMOU_CONF_SECTION);
    }

    public Config resteasy() {
        return this.main().getConfig(RESTEASY_CONF_SECTION);
    }

    private Config loadConf() {
        Config config;
        File configFile = Environment.getServerConfPath().toFile();
// Path: src/main/java/com/adeptj/runtime/common/Environment.java
// public final class Environment {
// 
//     /**
//      * Deny direct instantiation.
//      */
//     private Environment() {
//     }
// 
//     public static boolean isDev() {
//         return ServerMode.DEV.toString().equalsIgnoreCase(System.getProperty(SYS_PROP_SERVER_MODE));
//     }
// 
//     public static Path getServerConfPath() {
//         return Paths.get(USER_DIR, DIR_ADEPTJ_RUNTIME, DIR_DEPLOYMENT, SERVER_CONF_FILE);
//     }
// 
//     public static Path getFrameworkConfPath() {
//         return Paths.get(USER_DIR, DIR_ADEPTJ_RUNTIME, DIR_DEPLOYMENT, FRAMEWORK_CONF_FILE);
//     }
// }
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String COMMON_CONF_SECTION = "common";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String FELIX_CONF_SECTION = "felix";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String LOGGING_CONF_SECTION = "logging";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String MAIN_CONF_SECTION = "main";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String RESTEASY_CONF_SECTION = "resteasy";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String SERVER_CONF_FILE = "server.conf";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String SYS_PROP_OVERWRITE_SERVER_CONF = "overwrite.server.conf.file";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String TRIMOU_CONF_SECTION = "trimou";
// 
// Path: src/main/java/com/adeptj/runtime/common/Constants.java
// public static final String UNDERTOW_CONF_SECTION = "undertow";


// Path: src/main/java/com/adeptj/runtime/config/Configs.java
import static com.adeptj.runtime.common.Constants.RESTEASY_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.SERVER_CONF_FILE;
import static com.adeptj.runtime.common.Constants.SYS_PROP_OVERWRITE_SERVER_CONF;
import static com.adeptj.runtime.common.Constants.TRIMOU_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.UNDERTOW_CONF_SECTION;
import com.adeptj.runtime.common.Environment;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import java.io.File;
import static com.adeptj.runtime.common.Constants.COMMON_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.FELIX_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.LOGGING_CONF_SECTION;
import static com.adeptj.runtime.common.Constants.MAIN_CONF_SECTION;

        return this.root.getConfig(MAIN_CONF_SECTION);
    }

    public Config undertow() {
        return this.main().getConfig(UNDERTOW_CONF_SECTION);
    }

    public Config felix() {
        return this.main().getConfig(FELIX_CONF_SECTION);
    }

    public Config common() {
        return this.main().getConfig(COMMON_CONF_SECTION);
    }

    public Config logging() {
        return this.main().getConfig(LOGGING_CONF_SECTION);
    }

    public Config trimou() {
        return this.main().getConfig(TRIMOU_CONF_SECTION);
    }

    public Config resteasy() {
        return this.main().getConfig(RESTEASY_CONF_SECTION);
    }

    private Config loadConf() {
        Config config;
        File configFile = Environment.getServerConfPath().toFile();
        if (configFile.exists()) {