|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.io.read.BeanCreationChain org.apache.commons.betwixt.io.read.BeanCreationList
public class BeanCreationList
Chain implementation that's backed by a list. This is the default implementation used by Betwixt.
Note this implementation is not intended to allow multiple threads of execution to perform modification operations concurrently with traversal of the chain. Users who require this behaviour are advised to create their own implementation.
Constructor Summary | |
---|---|
BeanCreationList()
|
Method Summary | |
---|---|
void |
addBeanCreator(ChainedBeanCreator beanCreator)
Adds a BeanCreator to the end of the chain. |
void |
clearBeanCreators()
Clears the creator chain. |
java.lang.Object |
create(ElementMapping elementMapping,
ReadContext readContext)
Creates an Object based on the given element mapping and read context. |
static BeanCreationList |
createStandardChain()
Creates the default BeanCreationChain used when reading beans. |
int |
getSize()
Gets the number of BeanCreators in the wrapped chain. |
void |
insertBeanCreator(int index,
ChainedBeanCreator beanCreator)
Inserts a BeanCreator at the given position in the chain. |
Methods inherited from class org.apache.commons.betwixt.io.read.BeanCreationChain |
---|
createDefaultChain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanCreationList()
Method Detail |
---|
public static final BeanCreationList createStandardChain()
BeanCreationChain
used when reading beans.
BeanCreationList
with the default creators loader in order, not nullpublic java.lang.Object create(ElementMapping elementMapping, ReadContext readContext)
create
in class BeanCreationChain
elementMapping
- the element mapping detailsreadContext
- create against this context
public int getSize()
ChainedBeanCreator
's in the current chainpublic void insertBeanCreator(int index, ChainedBeanCreator beanCreator) throws java.lang.IndexOutOfBoundsException
BeanCreator
at the given position in the chain.
Shifts the object currently in that position - and any subsequent elements -
to the right.
index
- index at which the creator should be insertedbeanCreator
- the BeanCreator
to be inserted, not null
java.lang.IndexOutOfBoundsException
- if the index is out of the range
(index < 0 || index > getSize())
public void addBeanCreator(ChainedBeanCreator beanCreator)
BeanCreator
to the end of the chain.
beanCreator
- the BeanCreator
to be inserted, not nullpublic void clearBeanCreators()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |