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.Object
getValue(ParsingContext context)
Returns the unmarshalled property value.boolean
isProperty()
Returns whether this iteration is a property of a bean object.void
setArrayType(java.lang.Class<?> arrayType)
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.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:Property
Returns the property type.- Specified by:
type
in interfaceProperty
- Overrides:
type
in classCollectionParser
- Returns:
Property.SIMPLE
,Property.COMPLEX
,Property.AGGREGATION_ARRAY
,Property.COLLECTION
,Property.AGGREGATION_COLLECTION
, orProperty.MAP
-
isProperty
public boolean isProperty()
Description copied from class:CollectionParser
Returns whether this iteration is a property of a bean object.- Overrides:
isProperty
in classCollectionParser
- Returns:
- true if this iteration is a property, false otherwise
-
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 classCollectionParser
- 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 classCollectionParser
- Parameters:
context
- theParsingContext
value
- the property value
-
createCollection
protected java.util.Collection<java.lang.Object> createCollection()
- Overrides:
createCollection
in classCollectionParser
-
getArrayType
public java.lang.Class<?> getArrayType()
-
setArrayType
public void setArrayType(java.lang.Class<?> arrayType)
-
-