private Map < String , Resource > getClassPathResources ( String mimetype , Collection < String > paths ) { // If no paths are provided, just return an empty map if ( paths == null ) return Collections . < String , Resource > emptyMap ( ) ; // Add classpath resource for each path provided Map < String , Resource > resources = new HashMap < String , Resource > ( paths . size ( ) ) ; for ( String path : paths ) resources . put ( path , new ClassPathResource ( classLoader , mimetype , path ) ) ; // Callers should not rely on modifying the result return Collections . unmodifiableMap ( resources ) ; }
Returns a new map of all resources corresponding to the collection of paths provided . Each resource will be associated with the given mimetype and stored in the map using its path as the key .