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