@Test public void testReadWithProcessorsUsingInterface() throws IOException { assertArrayEquals(HEADER, beanReader.getHeader(true)); final String[] header = new String[] { "customerNo", null, null, null, null, "mailingAddress", null, null, null, null, "loyaltyPoints" }; int i = 0; Customer customer; while( (customer = beanReader.read(Customer.class, header, READ_PROCESSORS)) != null ) { assertEquals(CUSTOMERS.get(i).getCustomerNo(), customer.getCustomerNo()); assertEquals(CUSTOMERS.get(i).getMailingAddress(), customer.getMailingAddress()); assertEquals(CUSTOMERS.get(i).getLoyaltyPoints(), customer.getLoyaltyPoints()); i++; } assertEquals(CUSTOMERS.size() + 1, beanReader.getRowNumber()); }
public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } CsvBeanReader(final Reader reader, final CsvPreference preferences);  CsvBeanReader(final ITokenizer tokenizer, final CsvPreference preferences); }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } CsvBeanReader(final Reader reader, final CsvPreference preferences);  CsvBeanReader(final ITokenizer tokenizer, final CsvPreference preferences); T read(final Class<T> clazz, final String... nameMapping); T read(final Class<T> clazz, final String[] nameMapping, final CellProcessor... processors); T read(final T bean, final String... nameMapping); T read(final T bean, final String[] nameMapping, final CellProcessor... processors); }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } CsvBeanReader(final Reader reader, final CsvPreference preferences);  CsvBeanReader(final ITokenizer tokenizer, final CsvPreference preferences); T read(final Class<T> clazz, final String... nameMapping); T read(final Class<T> clazz, final String[] nameMapping, final CellProcessor... processors); T read(final T bean, final String... nameMapping); T read(final T bean, final String[] nameMapping, final CellProcessor... processors);  }