io.github.sskorol.data.DataReader Maven / Gradle / Ivy
package io.github.sskorol.data;
import one.util.streamex.StreamEx;
import java.io.IOException;
import java.net.URL;
import static io.github.sskorol.utils.ReflectionUtils.getSourcePath;
public interface DataReader {
StreamEx read();
Class getEntityClass();
String getPath();
default URL getUrl() throws IOException {
return getPath().isEmpty() ? getSourcePath(getEntityClass()) : getSourcePath(getPath());
}
}