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
AParsertree component for parsing an array of bean objects, where a bean object is mapped to aRecord.A
RecordArraysupports a singleRecordchild.- 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.ObjectgetValue(ParsingContext context)Returns the unmarshalled property value.voidsetArrayType(java.lang.Class<?> arrayType)Sets the class type of the array (e.g.voidsetValue(ParsingContext context, java.lang.Object value)Sets the property value for marshaling.inttype()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:PropertyReturns the property type.- Specified by:
typein interfaceProperty- Overrides:
typein 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:ParserReturns the unmarshalled property value.- Specified by:
getValuein interfaceParser- Specified by:
getValuein interfaceProperty- Overrides:
getValuein classRecordAggregation- Parameters:
context- theParsingContext- Returns:
- the property value
-
setValue
public void setValue(ParsingContext context, java.lang.Object value)
Description copied from interface:ParserSets the property value for marshaling.- Specified by:
setValuein interfaceParser- Specified by:
setValuein interfaceProperty- Overrides:
setValuein classRecordCollection- Parameters:
context- theParsingContextvalue- the property value
-
createAggregationType
protected java.util.Collection<java.lang.Object> createAggregationType()
- Overrides:
createAggregationTypein 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.classforint[])- Parameters:
arrayType- the array class type
-
-