public class

ArrayBindAction

extends MappingAction.Base
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

Class Overview

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).

Summary

[Expand]
Inherited Fields
From class org.apache.commons.betwixt.io.read.MappingAction
Public Constructors
ArrayBindAction()
Public Methods
MappingAction begin(String namespace, String name, 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.
final 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, Attributes attributes, ReadContext context)
Construct a delegating implmentation that wraps the real bean creator
[Expand]
Inherited Methods
From class org.apache.commons.betwixt.io.read.MappingAction.Base
From class org.apache.commons.betwixt.io.read.MappingAction
From class java.lang.Object

Public Constructors

public ArrayBindAction ()

Public Methods

public MappingAction begin (String namespace, String name, 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.

Parameters
attributes Attributes not null
context Context not null
Returns
  • the MappingAction to be used to map the sub-graph under this element
Throws
Exception

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

public void end (ReadContext context)

Pops the ArrayList and the updater from their stacks. The original updater is called with the result of the convertion.

Throws
Exception

public MappingAction next (String namespace, String name, Attributes attributes, ReadContext context)

Construct a delegating implmentation that wraps the real bean creator

Throws
Exception