public class CollectionParser extends Aggregation
Segment or Field,
 and is optionally bound to a Collection type property value.
 
 A CollectionParser must contain exactly one child ParserComponent.
| Type | Property and Description | 
|---|---|
| boolean | isGets the value of the property property. | 
lazy, occursAGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE| Constructor and Description | 
|---|
| CollectionParser()Constructs a new CollectionParser. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clearValue(ParsingContext context)Clears the current property value. | 
| protected Collection<Object> | createCollection() | 
| Object | createValue(ParsingContext context)Creates the property value and returns it. | 
| boolean | defines(Object value) | 
| protected Collection<Object> | getCollection(ParsingContext context)Returns the collection value being parsed. | 
| int | getIterationSize()Returns the size of the components that make up a single iteration. | 
| Class<? extends Collection<Object>> | getType() | 
| Object | getValue(ParsingContext context)Returns the unmarshalled property value. | 
| boolean | hasContent(ParsingContext context)Returns whether this parser or any of its descendant have content for marshalling. | 
| protected boolean | isInvalid(ParsingContext context)Returns whether this iteration contained invalid values when last unmarshalled. | 
| boolean | isProperty()Gets the value of the property property. | 
| protected int | length(Object value)Returns the length of aggregation. | 
| protected boolean | marshal(MarshallingContext context,
       Parser delegate,
       int minOccurs,
       int maxOccurs) | 
| boolean | matches(UnmarshallingContext context)Returns whether this parser and its children match a record
 being unmarshalled. | 
| void | registerLocals(Set<ParserLocal<? extends Object>> locals)Called by a stream to register variables stored in the parsing context. | 
| void | setType(Class<?> collectionType) | 
| void | setValue(ParsingContext context,
        Object value)Sets the property value for marshaling. | 
| protected void | toParamString(StringBuilder s)Called by  TreeNode.toString()to append node parameters to the output. | 
| int | type()Returns the property type. | 
| protected boolean | unmarshal(UnmarshallingContext context,
         Parser delegate,
         int minOccurs,
         int maxOccurs) | 
getAccessor, getIterationIndex, getMaxOccurs, getMinOccurs, getOccurs, isDynamicIteration, isIdentifier, isLazy, isOptional, marshal, setAccessor, setIdentifier, setIterationIndex, setLazy, setMaxOccurs, setMinOccurs, setOccurs, unmarshalgetParser, getSizeisSupportedChildadd, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferencesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic boolean isProperty
isProperty in class Aggregationpublic void clearValue(ParsingContext context)
ParserclearValue in interface ParserclearValue in interface PropertyclearValue in class DelegatingParsercontext - the ParsingContextpublic boolean defines(Object value)
public boolean matches(UnmarshallingContext context)
Parsermatches in interface Parsermatches in class DelegatingParsercontext - the UnmarshallingContextprotected boolean marshal(MarshallingContext context, Parser delegate, int minOccurs, int maxOccurs) throws IOException
marshal in class AggregationIOExceptionprotected boolean unmarshal(UnmarshallingContext context, Parser delegate, int minOccurs, int maxOccurs)
unmarshal in class Aggregationpublic boolean isProperty()
isProperty in class Aggregationprotected boolean isInvalid(ParsingContext context)
protected Collection<Object> getCollection(ParsingContext context)
Collectionprotected int length(Object value)
Aggregationlength in class Aggregationvalue - the aggregation valuepublic void setType(Class<?> collectionType)
public Class<? extends Collection<Object>> getType()
public Object createValue(ParsingContext context)
Propertycontext - the ParsingContextpublic Object getValue(ParsingContext context)
ParsergetValue in interface ParsergetValue in interface PropertygetValue in class DelegatingParsercontext - the ParsingContextpublic void setValue(ParsingContext context, Object value)
ParsersetValue in interface ParsersetValue in interface PropertysetValue in class Aggregationcontext - the ParsingContextvalue - the property valueprotected Collection<Object> createCollection()
public int type()
Propertypublic int getIterationSize()
Iterationpublic void registerLocals(Set<ParserLocal<? extends Object>> locals)
ComponentregisterLocals in class Aggregationlocals - set of local variablespublic boolean hasContent(ParsingContext context)
ParserhasContent in interface ParserhasContent in class DelegatingParsercontext - the ParsingContextprotected void toParamString(StringBuilder s)
TreeNodeTreeNode.toString() to append node parameters to the output.toParamString in class Aggregations - the output to append