public class MapParser extends Aggregation
| Type | Property and Description |
|---|---|
boolean |
is
Gets the value of the property property.
|
lazy, occursAGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE| Constructor and Description |
|---|
MapParser()
Constructs a new MapParser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearValue(ParsingContext context)
Clears the current property value.
|
protected Map<Object,Object> |
createMap() |
Object |
createValue(ParsingContext context)
Creates the property value and returns it.
|
boolean |
defines(Object value) |
int |
getIterationSize()
Returns the size of the components that make up a single iteration.
|
Property |
getKey() |
protected Map<Object,Object> |
getMap(ParsingContext context)
Returns the map value being parsed.
|
Class<? extends Map<Object,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.
|
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 |
setKey(Property key) |
void |
setType(Class<?> mapType)
Sets the concrete
Map type. |
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 Aggregationpublic 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 Map<Object,Object> getMap(ParsingContext context)
Mapprotected int length(Object value)
Aggregationlength in class Aggregationvalue - the aggregation valuepublic int getIterationSize()
Iterationpublic int type()
Propertypublic 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 ParsingContextpublic Property getKey()
public void setKey(Property key)
protected void toParamString(StringBuilder s)
TreeNodeTreeNode.toString() to append node parameters to the output.toParamString in class Aggregations - the output to append