public static Config getConfig ( ) { final Configuration systemConfig = new SystemConfiguration ( ) ; final String configName = systemConfig . getString ( CONFIG_PROPERTY_NAME ) ; final String configLocation = systemConfig . getString ( CONFIG_LOCATION_PROPERTY_NAME ) ; Preconditions . checkState ( configLocation != null , "Config location must be set!" ) ; final ConfigFactory configFactory = new ConfigFactory ( URI . create ( configLocation ) , configName ) ; return new Config ( configFactory . load ( ) ) ; }
Loads the configuration . The no - args method uses system properties to determine which configurations to load .