org.beanio.internal.parser
Class RecordArray
java.lang.Object
org.beanio.internal.util.TreeNode<Component>
org.beanio.internal.parser.Component
org.beanio.internal.parser.ParserComponent
org.beanio.internal.parser.DelegatingParser
org.beanio.internal.parser.RecordAggregation
org.beanio.internal.parser.RecordCollection
org.beanio.internal.parser.RecordArray
- All Implemented Interfaces:
- Cloneable, Iterable<Component>, Parser, Property, Selector, Replicateable
public class RecordArray
- extends RecordCollection
A Parser
tree component for parsing an array of bean objects, where
a bean object is mapped to a Record
.
A RecordArray supports a single Record
child.
- Since:
- 2.0
- Author:
- Kevin Seim
Constructor Summary |
RecordArray()
Constructs a new RecordArray. |
Methods inherited from class org.beanio.internal.parser.RecordAggregation |
clearValue, close, createValue, defines, getAccessor, getCount, getMaxOccurs, getMinOccurs, getNullValue, getOrder, getProperty, getSelector, getType, isIdentifier, isMaxOccursReached, isRecordGroup, isSupportedChild, matchAny, matchNext, matchNext, registerLocals, reset, restoreState, setAccessor, setCount, setIdentifier, setType, skip, updateState |
Methods inherited from class org.beanio.internal.util.TreeNode |
add, clone, find, getChildren, getFirst, getName, iterator, print, setName, size, sort, toParamString, toString, updateReferences |
Methods inherited from interface org.beanio.internal.parser.Property |
getName |
RecordArray
public RecordArray()
- Constructs a new RecordArray.
type
public int type()
- Description copied from interface:
Property
- Returns the property type.
- Specified by:
type
in interface Property
- Overrides:
type
in class RecordCollection
- Returns:
Property.SIMPLE
, Property.COMPLEX
, Property.AGGREGATION_ARRAY
, Property.COLLECTION
,
Property.AGGREGATION_COLLECTION
, or Property.MAP
getValue
public Object getValue(ParsingContext context)
- Description copied from interface:
Parser
- Returns the unmarshalled property value.
- Specified by:
getValue
in interface Parser
- Specified by:
getValue
in interface Property
- Overrides:
getValue
in class RecordAggregation
- Parameters:
context
- the ParsingContext
- Returns:
- the property value
setValue
public void setValue(ParsingContext context,
Object value)
- Description copied from interface:
Parser
- Sets the property value for marshaling.
- Specified by:
setValue
in interface Parser
- Specified by:
setValue
in interface Property
- Overrides:
setValue
in class RecordCollection
- Parameters:
context
- the ParsingContext
value
- the property value
createAggregationType
protected Collection<Object> createAggregationType()
- Overrides:
createAggregationType
in class RecordAggregation
getArrayType
public Class<?> getArrayType()
- Returns the class type of the array.
- Returns:
- the array class type
setArrayType
public void setArrayType(Class<?> arrayType)
- Sets the class type of the array (e.g. int.class for int[])
- Parameters:
arrayType
- the array class type
Copyright © 2010-2013 Kevin Seim