class ResourceFactory {

    public static Resource newResource(String path, ClassLoader classLoader) {
        if (path.startsWith(CLASSPATH_SCHEME)) {
            return new ClasspathResource(path, classLoader);
        }

        return new FileResource(path);
    }

}