}
@SuppressWarnings("unchecked")
public static Iterable<JavaSource> javaSourceOf(FreudSource source) {
if (File.class.equals(source.getType())) {
return new AnalysedObjects<File, JavaSource>(new JavaSourceJdomFromFileCreator(), source.getSources());
}
if (URL.class.equals(source.getType())) {
return new AnalysedObjects<URL, JavaSource>(new JavaSourceJdomFromUrlCreator(), source.getSources());
}
throw new UnsupportedOperationException("Unsupported conversion " + source.getType() + " to JavaSource");