1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.morph.reflect.reflectors;
17
18 import net.sf.morph.reflect.BeanReflector;
19
20 /**
21 * Convenient base class for BeanReflectors. Validates arguments and takes care
22 * of logging and exception handling.
23 *
24 * @author Matt Sgarlata
25 * @since Nov 14, 2004
26 */
27 public abstract class BaseBeanReflector extends BaseReflector implements BeanReflector {
28
29 /**
30 * Template method must be overridden.
31 * {@inheritDoc}
32 */
33 protected abstract String[] getPropertyNamesImpl(Object bean) throws Exception;
34
35 /**
36 * Template method must be overridden.
37 * {@inheritDoc}
38 */
39 protected abstract Class getTypeImpl(Object bean, String propertyName)
40 throws Exception;
41
42 /**
43 * Template method must be overridden.
44 * {@inheritDoc}
45 */
46 protected abstract Object getImpl(Object bean, String propertyName) throws Exception;
47
48 /**
49 * Template method must be overridden.
50 * {@inheritDoc}
51 */
52 protected abstract void setImpl(Object bean, String propertyName, Object value)
53 throws Exception;
54
55
56
57
58 }