// Path: src/main/java/io/github/sskorol/utils/ReflectionUtils.java
// public static <T> URL getSourcePath(final Class<T> entity) throws IOException {
//     return getSourcePath(ofNullable(entity.getDeclaredAnnotation(Source.class))
//             .map(Source::path)
//             .orElse(""));
// }


import one.util.streamex.StreamEx;
import java.io.IOException;
import java.net.URL;
import static io.github.sskorol.utils.ReflectionUtils.getSourcePath;
package io.github.sskorol.data;




public interface DataReader<T> {

    StreamEx<T> read();

    Class<T> getEntityClass();

    String getPath();

    default URL getUrl() throws IOException {
// Path: src/main/java/io/github/sskorol/utils/ReflectionUtils.java
// public static <T> URL getSourcePath(final Class<T> entity) throws IOException {
//     return getSourcePath(ofNullable(entity.getDeclaredAnnotation(Source.class))
//             .map(Source::path)
//             .orElse(""));
// }


// Path: src/main/java/io/github/sskorol/data/DataReader.java
import one.util.streamex.StreamEx;
import java.io.IOException;
import java.net.URL;
import static io.github.sskorol.utils.ReflectionUtils.getSourcePath;

package io.github.sskorol.data;




public interface DataReader<T> {

    StreamEx<T> read();

    Class<T> getEntityClass();

    String getPath();

    default URL getUrl() throws IOException {
        return getPath().isEmpty() ? getSourcePath(getEntityClass()) : getSourcePath(getPath());