Package org.beanio.internal.parser
Class RecordArray
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<Component>
,Parser
,Property
,Selector
,Replicateable
public class RecordArray extends RecordCollection
AParser
tree component for parsing an array of bean objects, where a bean object is mapped to aRecord
.A
RecordArray
supports a singleRecord
child.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.parser.RecordAggregation
lazy, value
-
Fields inherited from interface org.beanio.internal.parser.Property
AGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE
-
-
Constructor Summary
Constructors Constructor Description RecordArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<java.lang.Object>
createAggregationType()
java.lang.Class<?>
getArrayType()
Returns the class type of the array.java.lang.Object
getValue(ParsingContext context)
Returns the unmarshalled property value.void
setArrayType(java.lang.Class<?> arrayType)
Sets the class type of the array (e.g.void
setValue(ParsingContext context, java.lang.Object value)
Sets the property value for marshaling.int
type()
Returns the property type.-
Methods inherited from class org.beanio.internal.parser.RecordCollection
getCollection, hasContent, marshal, unmarshal
-
Methods inherited from class org.beanio.internal.parser.RecordAggregation
clearValue, close, createValue, defines, getAccessor, getCount, getMaxOccurs, getMinOccurs, getNullValue, getOrder, getProperty, getSelector, getType, isIdentifier, isLazy, isMaxOccursReached, isRecordGroup, isSupportedChild, matchAny, matchNext, matchNext, registerLocals, reset, restoreState, setAccessor, setCount, setIdentifier, setLazy, setType, skip, toParamString, updateState
-
Methods inherited from class org.beanio.internal.parser.DelegatingParser
getParser, getSize, isOptional, matches
-
Methods inherited from class org.beanio.internal.util.TreeNode
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferences
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.beanio.internal.parser.Parser
getName, getSize, isOptional, matches
-
-
-
-
Method Detail
-
type
public int type()
Description copied from interface:Property
Returns the property type.- Specified by:
type
in interfaceProperty
- Overrides:
type
in classRecordCollection
- Returns:
Property.SIMPLE
,Property.COMPLEX
,Property.AGGREGATION_ARRAY
,Property.COLLECTION
,Property.AGGREGATION_COLLECTION
, orProperty.MAP
-
getValue
public java.lang.Object getValue(ParsingContext context)
Description copied from interface:Parser
Returns the unmarshalled property value.- Specified by:
getValue
in interfaceParser
- Specified by:
getValue
in interfaceProperty
- Overrides:
getValue
in classRecordAggregation
- Parameters:
context
- theParsingContext
- Returns:
- the property value
-
setValue
public void setValue(ParsingContext context, java.lang.Object value)
Description copied from interface:Parser
Sets the property value for marshaling.- Specified by:
setValue
in interfaceParser
- Specified by:
setValue
in interfaceProperty
- Overrides:
setValue
in classRecordCollection
- Parameters:
context
- theParsingContext
value
- the property value
-
createAggregationType
protected java.util.Collection<java.lang.Object> createAggregationType()
- Overrides:
createAggregationType
in classRecordAggregation
-
getArrayType
public java.lang.Class<?> getArrayType()
Returns the class type of the array.- Returns:
- the array class type
-
setArrayType
public void setArrayType(java.lang.Class<?> arrayType)
Sets the class type of the array (e.g.int.class
forint[]
)- Parameters:
arrayType
- the array class type
-
-