org.apache.commons.betwixt.io.read
Class ArrayBindAction
java.lang.Object
org.apache.commons.betwixt.io.read.MappingAction
org.apache.commons.betwixt.io.read.MappingAction.Base
org.apache.commons.betwixt.io.read.ArrayBindAction
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).
- Version:
- $Revision: 561314 $
- Author:
- Apache Commons Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayBindAction
public ArrayBindAction()
createMappingAction
public static final MappingAction createMappingAction(ElementDescriptor elementDescriptor)
- Factory method creates implementations to map arrays.
- Parameters:
elementDescriptor
- ElementDescriptor
to be mapped,
not null
- Returns:
MappingAction
, not null
begin
public MappingAction begin(String namespace,
String name,
Attributes attributes,
ReadContext context)
throws Exception
- Mapping arrays requires the addition of a temporary object
(an
ArrayList
) into the stack together with an
updater for that object.
- Overrides:
begin
in class MappingAction.Base
attributes
- Attributes not nullcontext
- Context not null
- Returns:
- the MappingAction to be used to map the sub-graph
under this element
- Throws:
Exception
- See Also:
MappingAction.begin(String, String, Attributes, ReadContext)
end
public void end(ReadContext context)
throws Exception
- Pops the
ArrayList
and the updater from
their stacks. The original updater is called with the
result of the convertion.
- Overrides:
end
in class MappingAction.Base
- Throws:
Exception
- See Also:
MappingAction.end(ReadContext)
next
public MappingAction next(String namespace,
String name,
Attributes attributes,
ReadContext context)
throws Exception
- Construct a delegating implmentation that wraps the real bean creator
- Overrides:
next
in class MappingAction.Base
- Throws:
Exception
Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.