1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.betwixt.io.read;
18
19 /***
20 * A Chain of bean creators.
21 *
22 * @author Robert Burrell Donkin
23 * @since 0.5
24 */
25 public abstract class BeanCreationChain {
26
27
28
29
30 /***
31 * Creates the default <code>BeanCreationChain</code> used when reading beans.
32 * @return a <code>BeanCreationList</code> with the default creators loader in order, not null
33 */
34 public static final BeanCreationChain createDefaultChain() {
35
36
37 return BeanCreationList.createStandardChain();
38 }
39
40
41
42 /***
43 * Create a bean for the given mapping in the given context.
44 *
45 * @param elementMapping specifies the mapping between the type and element.
46 * <strong>Note</strong> it is recommended that classes do not store a permenant
47 * reference to this object since these objects may later be reused.
48 * Not null
49 * @param context the context in which this creation happens, not null
50 * @return the bean, possibly null
51 */
52 public abstract Object create(ElementMapping elementMapping, ReadContext context);
53
54 }