Package org.beanio.internal.parser
Class ArrayParser
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<Component>,Iteration,Parser,Property,Replicateable
public class ArrayParser extends CollectionParser
- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.parser.Aggregation
lazy, occurs
-
Fields inherited from interface org.beanio.internal.parser.Property
AGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE
-
-
Constructor Summary
Constructors Constructor Description ArrayParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<java.lang.Object>createCollection()java.lang.Class<?>getArrayType()java.lang.ObjectgetValue(ParsingContext context)Returns the unmarshalled property value.booleanisProperty()Returns whether this iteration is a property of a bean object.voidsetArrayType(java.lang.Class<?> arrayType)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.CollectionParser
clearValue, createValue, defines, getCollection, getIterationSize, getType, hasContent, isInvalid, length, marshal, matches, registerLocals, setType, toParamString, unmarshal
-
Methods inherited from class org.beanio.internal.parser.Aggregation
getAccessor, getIterationIndex, getMaxOccurs, getMinOccurs, getOccurs, isDynamicIteration, isIdentifier, isLazy, isOptional, marshal, setAccessor, setIdentifier, setIterationIndex, setLazy, setMaxOccurs, setMinOccurs, setOccurs, unmarshal
-
Methods inherited from class org.beanio.internal.parser.DelegatingParser
getParser, getSize
-
Methods inherited from class org.beanio.internal.parser.ParserComponent
isSupportedChild
-
Methods inherited from class org.beanio.internal.util.TreeNode
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferences
-
-
-
-
Method Detail
-
type
public int type()
Description copied from interface:PropertyReturns the property type.- Specified by:
typein interfaceProperty- Overrides:
typein classCollectionParser- Returns:
Property.SIMPLE,Property.COMPLEX,Property.AGGREGATION_ARRAY,Property.COLLECTION,Property.AGGREGATION_COLLECTION, orProperty.MAP
-
isProperty
public boolean isProperty()
Description copied from class:CollectionParserReturns whether this iteration is a property of a bean object.- Overrides:
isPropertyin classCollectionParser- Returns:
- true if this iteration is a property, false otherwise
-
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 classCollectionParser- 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 classCollectionParser- Parameters:
context- theParsingContextvalue- the property value
-
createCollection
protected java.util.Collection<java.lang.Object> createCollection()
- Overrides:
createCollectionin classCollectionParser
-
getArrayType
public java.lang.Class<?> getArrayType()
-
setArrayType
public void setArrayType(java.lang.Class<?> arrayType)
-
-