class DeclaredTypeCodegen extends AbstractGenerator {

    public static DeclaredTypeCodegen ofPath(Path basePath) {
        try {
            Stream<File> files = Files.walk(basePath).map(Path::toFile);
            Set<Resource> resources = toResources(files);
            return new DeclaredTypeCodegen(resources);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }

    private  DeclaredTypeCodegen(Collection<Resource> resources);

}