public class LoaderFactory {
public static Loader getLoader(LoaderOption option, String path) {
switch (option) {
case JAR: {
return new DDRLoader(new JarResource(path));
}
case FOLDER: {
return new DDRLoader(new FileResource(path));
}
case URL: {
return new DDRLoader(new URLResource(path));
}
case NOOP: {
return new NoopLoader();
}
}