Class MultiBeanListProcessor
- java.lang.Object
-
- com.univocity.parsers.common.processor.core.AbstractMultiBeanProcessor<C>
-
- com.univocity.parsers.common.processor.core.AbstractMultiBeanRowProcessor<C>
-
- com.univocity.parsers.common.processor.core.AbstractMultiBeanListProcessor<ParsingContext>
-
- com.univocity.parsers.common.processor.MultiBeanListProcessor
-
- All Implemented Interfaces:
ConversionProcessor
,Processor<ParsingContext>
,RowProcessor
public class MultiBeanListProcessor extends AbstractMultiBeanListProcessor<ParsingContext> implements RowProcessor
ARowProcessor
implementation for converting rows extracted from any implementation ofAbstractParser
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
.- See Also:
AbstractParser
,RowProcessor
,BeanProcessor
,MultiBeanProcessor
-
-
Constructor Summary
Constructors Constructor Description MultiBeanListProcessor(int expectedBeanCount, java.lang.Class... beanTypes)
Creates a processor for java beans of multiple typesMultiBeanListProcessor(java.lang.Class... beanTypes)
Creates a processor for java beans of multiple types
-
Method Summary
-
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractMultiBeanListProcessor
getBeans, getBeans, getHeaders, processEnded, processStarted, rowProcessed
-
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractMultiBeanRowProcessor
beanProcessed
-
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractMultiBeanProcessor
convertAll, convertFields, convertIndexes, convertType, getBeanClasses, getProcessorOfType, rowProcessed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.univocity.parsers.common.processor.RowProcessor
processEnded, processStarted, rowProcessed
-
-
-
-
Constructor Detail
-
MultiBeanListProcessor
public MultiBeanListProcessor(int expectedBeanCount, java.lang.Class... beanTypes)
Creates a processor for java beans of multiple types- Parameters:
expectedBeanCount
- 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 outputList
returned byAbstractMultiBeanListProcessor.getBeans()
beanTypes
- the classes with their attributes mapped to fields of records parsed by anAbstractParser
or written by anAbstractWriter
.
-
MultiBeanListProcessor
public MultiBeanListProcessor(java.lang.Class... beanTypes)
Creates a processor for java beans of multiple types- Parameters:
beanTypes
- the classes with their attributes mapped to fields of records parsed by anAbstractParser
or written by anAbstractWriter
.
-
-