Source:
private void renderGetRanges() { line("@Deprecated"); line("public IterableView<BatchingVisitable<", RowResult, ">> getRanges(Iterable<RangeRequest> ranges) {"); { line("Iterable<BatchingVisitable<RowResult<byte[]>>> rangeResults = t.getRanges(tableRef, ranges);"); line("return IterableView.of(rangeResults).transform("); line(" new Function<BatchingVisitable<RowResult<byte[]>>, BatchingVisitable<", RowResult, ">>() {"); { line("@Override"); line("public BatchingVisitable<", RowResult, "> apply(BatchingVisitable<RowResult<byte[]>> visitable) {"); { line("return BatchingVisitables.transform(visitable, new Function<RowResult<byte[]>, ", RowResult, ">() {"); { line("@Override"); line("public ", RowResult, " apply(RowResult<byte[]> row) {"); { line("return ", RowResult, ".of(row);"); } line("}"); } line("});"); } line("}"); } line("});"); } line("}"); line(); line("public <T> Stream<T> getRanges(Iterable<RangeRequest> ranges,"); line(" int concurrencyLevel,"); line(" Function<BatchingVisitable<", RowResult, ">, T> visitableProcessor) {"); { line("return t.getRanges(tableRef, ranges, concurrencyLevel,"); line(" visitable -> visitableProcessor.apply(BatchingVisitables.transform(visitable, ", RowResult, "::of)));"); } line("}"); line(); line("public Stream<BatchingVisitable<", RowResult, ">> getUnfetchedRanges(Iterable<RangeRequest> ranges) {"); { line("Stream<BatchingVisitable<RowResult<byte[]>>> rangeResults = t.getUnfetchedRanges(tableRef, ranges);"); line("return rangeResults.map(visitable -> BatchingVisitables.transform(visitable, ", RowResult, "::of));"); } line("}"); }

Target:
private void renderGetRanges() { line("@Deprecated"); line("public IterableView<BatchingVisitable<", RowResult, ">> getRanges(Iterable<RangeRequest> ranges) {"); { line("Iterable<BatchingVisitable<RowResult<byte[]>>> rangeResults = t.getRanges(tableRef, ranges);"); line("return IterableView.of(rangeResults).transform("); line(" new Function<BatchingVisitable<RowResult<byte[]>>, BatchingVisitable<", RowResult, ">>() {"); { line("@Override"); line("public BatchingVisitable<", RowResult, "> apply(BatchingVisitable<RowResult<byte[]>> visitable) {"); { line("return BatchingVisitables.transform(visitable, new Function<RowResult<byte[]>, ", RowResult, ">() {"); { line("@Override"); line("public ", RowResult, " apply(RowResult<byte[]> row) {"); { line("return ", RowResult, ".of(row);"); } line("}"); } line("});"); } line("}"); } line("});"); } line("}"); line(); line("public <T> Stream<T> getRanges(Iterable<RangeRequest> ranges,"); line(" int concurrencyLevel,"); line(" BiFunction<RangeRequest, BatchingVisitable<", RowResult, ">, T> visitableProcessor) {"); { line("return t.getRanges(tableRef, ranges, concurrencyLevel,"); line(" (rangeRequest, visitable) -> visitableProcessor.apply(rangeRequest, BatchingVisitables.transform(visitable, ", RowResult, "::of)));"); } line("}"); line(); line("public Stream<BatchingVisitable<", RowResult, ">> getRangesLazy(Iterable<RangeRequest> ranges) {"); { line("Stream<BatchingVisitable<RowResult<byte[]>>> rangeResults = t.getRangesLazy(tableRef, ranges);"); line("return rangeResults.map(visitable -> BatchingVisitables.transform(visitable, ", RowResult, "::of));"); } line("}"); }