Top Description Constructors Methods
com.univocity.parsers.common.processor

public Class MultiBeanListProcessor

extends AbstractMultiBeanListProcessor<ParsingContext>
implements RowProcessor
Class Inheritance
All Implemented Interfaces
com.univocity.parsers.common.processor.RowProcessor, com.univocity.parsers.common.processor.core.Processor
Imports
com.univocity.parsers.common.*, com.univocity.parsers.common.processor.core.*, java.util.*

A RowProcessor implementation for converting rows extracted from any implementation of AbstractParser into java objects, storing them into lists. This processor stores beans in separate lists, one for each type of bean processed. All lists of all types will have the same number of entries as the number of records in the input. When an object of a particular type can't be generated from a row, null will be added to the list. This ensures all lists are the same size, and each element of each list contains the exact information parsed from each row.

The class types passed to the constructor of this class must contain the annotations provided in com.univocity.parsers.annotations.

Author
Univocity Software Pty Ltd - [email protected]
See Also
AbstractParser, RowProcessor, BeanProcessor, MultiBeanProcessor

Constructor Summary

AccessConstructor and Description
public
MultiBeanListProcessor(int
expected number of rows to be parsed from the input which will be converted into java beans. Used to pre-allocate the size of the output List returned by getBeans()
expectedBeanCount
,
Class<T>...
the classes with their attributes mapped to fields of records parsed by an AbstractParser or written by an AbstractWriter.
beanTypes
)

Creates a processor for java beans of multiple types

public
MultiBeanListProcessor(Class<T>...
the classes with their attributes mapped to fields of records parsed by an AbstractParser or written by an AbstractWriter.
beanTypes
)

Creates a processor for java beans of multiple types

Method Summary

Inherited from com.univocity.parsers.common.processor.core.AbstractMultiBeanListProcessor:
getBeansgetBeansgetHeadersprocessEndedprocessStartedrowProcessed

Constructor Detail

MultiBeanListProcessorback to summary
public MultiBeanListProcessor(int expectedBeanCount, Class<T>... beanTypes)

Creates a processor for java beans of multiple types

Parameters
expectedBeanCount:int

expected number of rows to be parsed from the input which will be converted into java beans. Used to pre-allocate the size of the output List returned by getBeans()

beanTypes:Class<T>[]

the classes with their attributes mapped to fields of records parsed by an AbstractParser or written by an AbstractWriter.

MultiBeanListProcessorback to summary
public MultiBeanListProcessor(Class<T>... beanTypes)

Creates a processor for java beans of multiple types

Parameters
beanTypes:Class<T>[]

the classes with their attributes mapped to fields of records parsed by an AbstractParser or written by an AbstractWriter.