public class ArrayBindAction extends MappingAction.Base
Acts to bind an array property. Note that this is intended to be used to map properties with a setter taking an array but which do not have an adder.
Note this implementation has state and therefore cannot be used concurrently (in simultaneous readings).
MappingAction.Base
EMPTY, IGNORE
Constructor and Description |
---|
ArrayBindAction() |
Modifier and Type | Method and Description |
---|---|
MappingAction |
begin(String namespace,
String name,
org.xml.sax.Attributes attributes,
ReadContext context)
Mapping arrays requires the addition of a temporary object
(an
ArrayList ) into the stack together with an
updater for that object. |
static MappingAction |
createMappingAction(ElementDescriptor elementDescriptor)
Factory method creates implementations to map arrays.
|
void |
end(ReadContext context)
Pops the
ArrayList and the updater from
their stacks. |
MappingAction |
next(String namespace,
String name,
org.xml.sax.Attributes attributes,
ReadContext context)
Construct a delegating implmentation that wraps the real bean creator
|
body
public static final MappingAction createMappingAction(ElementDescriptor elementDescriptor)
elementDescriptor
- ElementDescriptor
to be mapped,
not nullMappingAction
, not nullpublic MappingAction begin(String namespace, String name, org.xml.sax.Attributes attributes, ReadContext context) throws Exception
ArrayList
) into the stack together with an
updater for that object.begin
in class MappingAction.Base
attributes
- Attributes not nullcontext
- Context not nullException
MappingAction.begin(String, String, Attributes, ReadContext)
public void end(ReadContext context) throws Exception
ArrayList
and the updater from
their stacks. The original updater is called with the
result of the convertion.end
in class MappingAction.Base
Exception
MappingAction.end(ReadContext)
public MappingAction next(String namespace, String name, org.xml.sax.Attributes attributes, ReadContext context) throws Exception
next
in class MappingAction.Base
Exception
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.