public < T > T loadFiles ( Class < T > type , List < File > files , List < String > resources ) { if ( files == null ) { return loadResources ( type , resources ) ; } Config config = ConfigFactory . systemProperties ( ) ; for ( File file : files ) { config = config . withFallback ( ConfigFactory . parseFile ( file , ConfigParseOptions . defaults ( ) . setAllowMissing ( false ) ) ) ; } for ( String resource : resources ) { config = config . withFallback ( ConfigFactory . load ( classLoader , resource ) ) ; } return map ( checkNotNull ( config , "config cannot be null" ) . resolve ( ) , type ) ; }
Loads the given configuration file using the mapper falling back to the given resources .