@Test public void testNewJRDataSource() throws JRException { final DataRow dataRow = new DataRow("col1", "col2"); @SuppressWarnings({ "rawtypes", "unchecked" }) final Supplier dataProvider = () -> { final List l = new ArrayList(); l.add(dataRow); return l; }; @SuppressWarnings("unchecked") final JRDataSource newJRDataSource = JRDataSourceFactory .newJRDataSource(dataProvider); assertNotNull(newJRDataSource); assertTrue(newJRDataSource.next()); }
public static final <T> JRDataSource newJRDataSource( Supplier<? extends Collection<T>> dataProvider) { return new JRBeanCollectionDataSource(dataProvider.get()); }
JRDataSourceFactory { public static final <T> JRDataSource newJRDataSource( Supplier<? extends Collection<T>> dataProvider) { return new JRBeanCollectionDataSource(dataProvider.get()); } }
JRDataSourceFactory { public static final <T> JRDataSource newJRDataSource( Supplier<? extends Collection<T>> dataProvider) { return new JRBeanCollectionDataSource(dataProvider.get()); } private  JRDataSourceFactory(); }
JRDataSourceFactory { public static final <T> JRDataSource newJRDataSource( Supplier<? extends Collection<T>> dataProvider) { return new JRBeanCollectionDataSource(dataProvider.get()); } private  JRDataSourceFactory(); static final JRDataSource newJRDataSource(
			Supplier<? extends Collection<T>> dataProvider); }
JRDataSourceFactory { public static final <T> JRDataSource newJRDataSource( Supplier<? extends Collection<T>> dataProvider) { return new JRBeanCollectionDataSource(dataProvider.get()); } private  JRDataSourceFactory(); static final JRDataSource newJRDataSource(
			Supplier<? extends Collection<T>> dataProvider);  }